linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] netfs: do not get the folio reference twice
@ 2022-07-05  2:22 xiubli
  2022-07-05  6:11 ` Xiubo Li
  0 siblings, 1 reply; 2+ messages in thread
From: xiubli @ 2022-07-05  2:22 UTC (permalink / raw)
  To: dhowells
  Cc: linux-kernel, willy, keescook, linux-fsdevel, linux-cachefs,
	Xiubo Li

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-05  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-05  2:22 [RFC PATCH] netfs: do not get the folio reference twice xiubli
2022-07-05  6:11 ` Xiubo Li

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).