From: Markus Elfring <Markus.Elfring@web.de>
To: linux-fsdevel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <dchinner@redhat.com>,
Glauber Costa <glommer@openvz.org>,
Nikolaos Karaolidis <nick@karaolidis.com>
Subject: [PATCH] fs: Use common code in inode_lru_isolate()
Date: Sat, 10 Oct 2026 18:48:13 +0200 [thread overview]
Message-ID: <57a2ddd8-0414-40de-b037-449cb2b5798e@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 10 Oct 2026 18:33:37 +0200
Use an additional label so that a few statements can be better reused
at the end of this function implementation.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/inode.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 702f2d5ef459..3cac85bf5ec3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -953,9 +953,7 @@ static enum lru_status inode_lru_isolate(struct list_head *item,
(inode_state_read(inode) & ~I_REFERENCED) ||
!mapping_shrinkable(&inode->i_data)) {
list_lru_isolate(lru, &inode->i_lru);
- spin_unlock(&inode->i_lock);
- this_cpu_dec(nr_unused);
- return LRU_REMOVED;
+ goto unlock;
}
/* Recently referenced inodes get one more pass */
@@ -989,6 +987,7 @@ static enum lru_status inode_lru_isolate(struct list_head *item,
WARN_ON(inode_state_read(inode) & I_NEW);
inode_state_set(inode, I_FREEING);
list_lru_isolate_move(lru, &inode->i_lru, freeable);
+unlock:
spin_unlock(&inode->i_lock);
this_cpu_dec(nr_unused);
--
2.56.0
reply other threads:[~2026-10-10 16:48 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=57a2ddd8-0414-40de-b037-449cb2b5798e@web.de \
--to=markus.elfring@web.de \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=dchinner@redhat.com \
--cc=glommer@openvz.org \
--cc=jack@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@karaolidis.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®