From f2b0c45f09796f87723a1225c919035457f72b7a Mon Sep 17 00:00:00 2001 From: Yan, Zheng Date: Tue, 23 May 2017 17:03:12 +0800 Subject: ceph: remove useless page->mapping check in writepage_nounlock() Callers of writepage_nounlock() have already ensured non-null page->mapping. Reported-by: Dan Carpenter Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- fs/ceph/addr.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'fs/ceph') diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 82220e9aaf7d..96f83a417944 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -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); -- cgit v1.2.3