Skip to content

Commit d1aa0c0

Browse files
committed
mm: revert "mm: shmem: fix data-race in shmem_getattr()"
Revert d949d1d ("mm: shmem: fix data-race in shmem_getattr()") as suggested by Chuck [1]. It is causing deadlocks when accessing tmpfs over NFS. As Hugh commented, "added just to silence a syzbot sanitizer splat: added where there has never been any practical problem". Link: https://lkml.kernel.org/r/[email protected] [1] Fixes: d949d1d ("mm: shmem: fix data-race in shmem_getattr()") Acked-by: Hugh Dickins <[email protected]> Cc: Chuck Lever <[email protected]> Cc: Jeongjun Park <[email protected]> Cc: Yu Zhao <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 737f341 commit d1aa0c0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mm/shmem.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,7 @@ static int shmem_getattr(struct mnt_idmap *idmap,
11661166
stat->attributes_mask |= (STATX_ATTR_APPEND |
11671167
STATX_ATTR_IMMUTABLE |
11681168
STATX_ATTR_NODUMP);
1169-
inode_lock_shared(inode);
11701169
generic_fillattr(idmap, request_mask, inode, stat);
1171-
inode_unlock_shared(inode);
11721170

11731171
if (shmem_huge_global_enabled(inode, 0, 0, false, NULL, 0))
11741172
stat->blksize = HPAGE_PMD_SIZE;

0 commit comments

Comments
 (0)