All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: ceph-devel@vger.kernel.org, idryomov@gmail.com
Cc: Matthew Wilcox <willy@infradead.org>
Subject: [PATCH] ceph: remove bogus check for NULL mapping in ceph_set_page_dirty
Date: Tue,  4 May 2021 10:53:11 -0400	[thread overview]
Message-ID: <20210504145311.89432-1-jlayton@kernel.org> (raw)

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 --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);
-- 
2.31.1


                 reply	other threads:[~2021-05-04 14:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210504145311.89432-1-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.