aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <[email protected]>2024-07-15 09:13:24 +0200
committerChristian Brauner <[email protected]>2024-08-30 08:22:36 +0200
commit122381a46954ad592ee93d7da2bef5074b396247 (patch)
treecb3e4f63bcda69c2dcfda20bc438c1828ffb097f
parent641bb4394f405cba498b100b44541ffc0aed5be1 (diff)
vfs: use RCU in ilookup
A soft lockup in ilookup was reported when stress-testing a 512-way system [1] (see [2] for full context) and it was verified that not taking the lock shifts issues back to mm. [1] https://lore.kernel.org/linux-mm/[email protected]/ [2] https://lore.kernel.org/linux-mm/[email protected]/ Signed-off-by: Mateusz Guzik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r--fs/inode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 10c4619faeef..de0969d6009c 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1570,9 +1570,7 @@ struct inode *ilookup(struct super_block *sb, unsigned long ino)
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
again:
- spin_lock(&inode_hash_lock);
- inode = find_inode_fast(sb, head, ino, true);
- spin_unlock(&inode_hash_lock);
+ inode = find_inode_fast(sb, head, ino, false);
if (inode) {
if (IS_ERR(inode))