diff options
| author | Ian Kent <[email protected]> | 2022-10-18 10:32:49 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-10-20 13:54:31 +0200 |
| commit | 92b57842f43014e6ca81ddf6d5d59e9ddf762e12 (patch) | |
| tree | 98f87028177b7abd25c8a0cd7866bac87996b0a1 /tools/perf/scripts/python | |
| parent | aa1d058d48f292aa138e33ad12b7b4d18b5407cd (diff) | |
kernfs: dont take i_lock on revalidate
In kernfs_dop_revalidate() when the passed in dentry is negative the
dentry directory is checked to see if it has changed and if so the
negative dentry is discarded so it can refreshed. During this check
the dentry inode i_lock is taken to mitigate against a possible
concurrent rename.
But if it's racing with a rename, becuase the dentry is negative, it
can't be the source it must be the target and it must be going to do
a d_move() otherwise the rename will return an error.
In this case the parent dentry of the target will not change, it will
be the same over the d_move(), only the source dentry parent may change
so the inode i_lock isn't needed.
Cc: Tejun Heo <[email protected]>
Signed-off-by: Ian Kent <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions