]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ceph: remove useless page->mapping check in writepage_nounlock()
authorYan, Zheng <zyan@redhat.com>
Tue, 23 May 2017 09:03:12 +0000 (17:03 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 7 Jul 2017 15:25:13 +0000 (17:25 +0200)
Callers of writepage_nounlock() have already ensured non-null
page->mapping.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c

index 82220e9aaf7de141bf4e0ce9ffdc1474d92c6aaa..96f83a417944c98efb8b608e9bc4fd78618cd727 100644 (file)
@@ -534,10 +534,6 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
 
        dout("writepage %p idx %lu\n", page, page->index);
 
-       if (!page->mapping || !page->mapping->host) {
-               dout("writepage %p - no mapping\n", page);
-               return -EFAULT;
-       }
        inode = page->mapping->host;
        ci = ceph_inode(inode);
        fsc = ceph_inode_to_client(inode);