linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiubli@redhat.com
To: dhowells@redhat.com
Cc: linux-kernel@vger.kernel.org, willy@infradead.org,
	keescook@chromium.org, linux-fsdevel@vger.kernel.org,
	linux-cachefs@redhat.com, Xiubo Li <xiubli@redhat.com>
Subject: [RFC PATCH] netfs: do not get the folio reference twice
Date: Tue,  5 Jul 2022 10:22:19 +0800	[thread overview]
Message-ID: <20220705022219.286459-1-xiubli@redhat.com> (raw)

From: Xiubo Li <xiubli@redhat.com>

And also the comment said it will drop the folio references but
the code was increasing it.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/netfs/buffered_read.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c
index 5b93e22397fe..a44a5b3b8d4c 100644
--- a/fs/netfs/buffered_read.c
+++ b/fs/netfs/buffered_read.c
@@ -396,9 +396,6 @@ int netfs_write_begin(struct netfs_inode *ctx,
 	 */
 	ractl._nr_pages = folio_nr_pages(folio);
 	netfs_rreq_expand(rreq, &ractl);
-
-	/* We hold the folio locks, so we can drop the references */
-	folio_get(folio);
 	while (readahead_folio(&ractl))
 		;
 
-- 
2.36.0.rc1


             reply	other threads:[~2022-07-05  2:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05  2:22 xiubli [this message]
2022-07-05  6:11 ` [RFC PATCH] netfs: do not get the folio reference twice Xiubo Li

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=20220705022219.286459-1-xiubli@redhat.com \
    --to=xiubli@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).