diff options
author | Jan Kara <jack@suse.cz> | 2023-06-01 13:58:26 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-06-07 10:15:11 +0300 |
commit | 2454ad83b90afbc6ed2c22ec1310b624c40bf0d3 (patch) | |
tree | c9f42379c81a15170ed4507fecccf3992a0098a5 /Documentation | |
parent | 28eceeda130f5058074dd007d9c59d2e8bc5af2e (diff) | |
download | linux-2454ad83b90afbc6ed2c22ec1310b624c40bf0d3.tar.xz |
fs: Restrict lock_two_nondirectories() to non-directory inodes
Currently lock_two_nondirectories() is skipping any passed directories.
After vfs_rename() uses lock_two_inodes(), all the remaining four users
of this function pass only regular files to it. So drop the somewhat
unusual "skip directory" logic and instead warn if anybody passes
directory to it. This also allows us to use lock_two_inodes() in
lock_two_nondirectories() to concentrate the lock ordering logic in less
places.
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <20230601105830.13168-6-jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions