public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Chuck Lever <chuck.lever@oracle.com>, Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	Dave Chinner <david@fromorbit.com>
Subject: [PATCH 2/6] nfsd: filecache: use nfsd_file_dispose_list() in nfsd_file_close_inode_sync()
Date: Fri,  7 Feb 2025 16:15:12 +1100	[thread overview]
Message-ID: <20250207051701.3467505-3-neilb@suse.de> (raw)
In-Reply-To: <20250207051701.3467505-1-neilb@suse.de>

nfsd_file_close_inode_sync() contains an exactly copy of
nfsd_file_dispose_list().

This patch removes it and calls nfsd_file_dispose_list() instead.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
---
 fs/nfsd/filecache.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index b13255bcbb96..7dc20143c854 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -666,17 +666,12 @@ nfsd_file_close_inode(struct inode *inode)
 void
 nfsd_file_close_inode_sync(struct inode *inode)
 {
-	struct nfsd_file *nf;
 	LIST_HEAD(dispose);
 
 	trace_nfsd_file_close(inode);
 
 	nfsd_file_queue_for_close(inode, &dispose);
-	while (!list_empty(&dispose)) {
-		nf = list_first_entry(&dispose, struct nfsd_file, nf_gc);
-		list_del_init(&nf->nf_gc);
-		nfsd_file_free(nf);
-	}
+	nfsd_file_dispose_list(&dispose);
 }
 
 static int
-- 
2.47.1


  parent reply	other threads:[~2025-02-07  5:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07  5:15 [PATCH 0/6] nfsd: filecache: various fixes NeilBrown
2025-02-07  5:15 ` [PATCH 1/6] nfsd: filecache: remove race handling NeilBrown
2025-02-10 23:33   ` Dave Chinner
2025-02-12 22:16     ` NeilBrown
2025-02-13 15:02       ` Chuck Lever
2025-02-07  5:15 ` NeilBrown [this message]
2025-02-07  5:15 ` [PATCH 3/6] nfsd: filecache: use list_lru_walk_node() in nfsd_file_gc() NeilBrown
2025-02-07 14:43   ` Chuck Lever
2025-02-09 23:16     ` NeilBrown
2025-02-10 13:46   ` Jeff Layton
2025-02-07  5:15 ` [PATCH 4/6] nfsd: filecache: introduce NFSD_FILE_RECENT NeilBrown
2025-02-07 14:52   ` Chuck Lever
2025-02-09 23:23     ` NeilBrown
2025-02-10  0:50       ` Chuck Lever
2025-02-10  2:31         ` NeilBrown
2025-02-10 14:25           ` Jeff Layton
2025-02-12 22:39             ` NeilBrown
2025-02-13  0:08               ` Chuck Lever
2025-02-13 11:27               ` Jeff Layton
2025-02-10 14:26           ` Chuck Lever
2025-02-10 14:01   ` Jeff Layton
2025-02-10 23:57     ` Dave Chinner
2025-02-11 11:38       ` Jeff Layton
2025-02-07  5:15 ` [PATCH 5/6] nfsd: filecache: don't repeatedly add/remove files on the lru list NeilBrown
2025-02-07  5:15 ` [PATCH 6/6] nfsd: filecache: drop the list_lru lock during lock gc scans NeilBrown

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=20250207051701.3467505-3-neilb@suse.de \
    --to=neilb@suse.de \
    --cc=Dai.Ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=david@fromorbit.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    /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