summaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-07-02 21:03:26 +0200
committerChristian Brauner <brauner@kernel.org>2024-07-02 21:18:32 +0200
commit391b59b045004d5b985d033263ccba3e941a7740 (patch)
treed170651a24545284b931015070471d2d34ae5794 /fs/afs
parentfilelock: Remove locks reliably when fcntl/close race is detected (diff)
downloadlinux-391b59b045004d5b985d033263ccba3e941a7740.tar.xz
linux-391b59b045004d5b985d033263ccba3e941a7740.zip
fs: better handle deep ancestor chains in is_subdir()
Jan reported that 'cd ..' may take a long time in deep directory hierarchies under a bind-mount. If concurrent renames happen it is possible to livelock in is_subdir() because it will keep retrying. Change is_subdir() from simply retrying over and over to retry once and then acquire the rename lock to handle deep ancestor chains better. The list of alternatives to this approach were less then pleasant. Change the scope of rcu lock to cover the whole walk while at it. A big thanks to Jan and Linus. Both Jan and Linus had proposed effectively the same thing just that one version ended up being slightly more elegant. Reported-by: Jan Kara <jack@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/afs')
0 files changed, 0 insertions, 0 deletions