diff mbox series

ceph: remove bogus check for NULL mapping in ceph_set_page_dirty

Message ID 20210504145311.89432-1-jlayton@kernel.org (mailing list archive)
State New, archived
Headers show
Series ceph: remove bogus check for NULL mapping in ceph_set_page_dirty | expand

Commit Message

Jeff Layton May 4, 2021, 2:53 p.m. UTC
This check is odd, as set_page_dirty is an address_space operation, and
I don't see where it would be called on a non-pagecache page.

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/addr.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index b47303b3772a..01316cb1314c 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -84,9 +84,6 @@  static int ceph_set_page_dirty(struct page *page)
 	struct ceph_snap_context *snapc;
 	int ret;
 
-	if (unlikely(!mapping))
-		return !TestSetPageDirty(page);
-
 	if (PageDirty(page)) {
 		dout("%p set_page_dirty %p idx %lu -- already dirty\n",
 		     mapping->host, page, page->index);