]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: Avoid changing nlink when file removes and attribute updates race
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 17 Nov 2025 20:28:17 +0000 (15:28 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 17 Nov 2025 22:31:32 +0000 (17:31 -0500)
commitbd4928ec799b31c492eb63f9f4a0c1e0bb4bb3f7
tree44784138167c6b21d52d72c581f8d38c2dc5e512
parent6a23ae0a96a600d1d12557add110e0bb6e32730c
NFS: Avoid changing nlink when file removes and attribute updates race

If a file removal races with another operation that updates its
attributes, then skip the change to nlink, and just mark the attributes
as being stale.

Reported-by: Aiden Lambert <alambert48@gatech.edu>
Fixes: 59a707b0d42e ("NFS: Ensure we revalidate the inode correctly after remove or rename")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c