fs: Use common code in inode_lru_isolate()
Subsystems (2)
PATCH 1/1 fs: Use common code in inode_lru_isolate()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- fs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/inode.c +2 -3
@@ -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);
Signature · 1 line
2.56.0