Skip to contentSkip to conversation

ceph: remove bogus check for NULL mapping in ceph_set_page_dirty

PATCH New Jeff Layton 1 participant 1 message May 4, 2021 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: remove bogus check for NULL mapping in ceph_set_page_dirty

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.

---
 fs/ceph/addr.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ceph/addr.c +0 -3
index b47303b3772a..01316cb1314c 100644
@@ -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);
Signature · 1 line
2.31.1