diff options
author | Mateusz Guzik <mjguzik@gmail.com> | 2024-07-15 09:13:24 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-30 08:22:36 +0200 |
commit | 122381a46954ad592ee93d7da2bef5074b396247 (patch) | |
tree | cb3e4f63bcda69c2dcfda20bc438c1828ffb097f /fs/inode.c | |
parent | fs: move FMODE_UNSIGNED_OFFSET to fop_flags (diff) | |
download | linux-122381a46954ad592ee93d7da2bef5074b396247.tar.xz linux-122381a46954ad592ee93d7da2bef5074b396247.zip |
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/56865e57-c250-44da-9713-cf1404595bcc@amd.com/
[2] https://lore.kernel.org/linux-mm/d2841226-e27b-4d3d-a578-63587a3aa4f3@amd.com/
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20240715071324.265879-1-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 4 |
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)) |