diff options
author | Christoph Hellwig <hch@lst.de> | 2025-04-23 06:59:41 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-04-25 12:11:45 +0200 |
commit | e079d7c4db5cba1e8a315dc93030dfb6c7b49459 (patch) | |
tree | dd9671426342cc89a3b90ce31bbb584b8796dad4 /scripts/clang-tools/gen_compile_commands.py | |
parent | 0d039eac6e5950f9d1ecc9e410c2fd1feaeab3b6 (diff) | |
download | linux-e079d7c4db5cba1e8a315dc93030dfb6c7b49459.tar.gz linux-e079d7c4db5cba1e8a315dc93030dfb6c7b49459.tar.bz2 linux-e079d7c4db5cba1e8a315dc93030dfb6c7b49459.zip |
devtmpfs: don't use vfs_getattr_nosec to query i_mode
The recent move of the bdev_statx call to the low-level vfs_getattr_nosec
helper caused it being used by devtmpfs, which leads to deadlocks in
md teardown due to the block device lookup and put interfering with the
unusual lifetime rules in md.
But as handle_remove only works on inodes created and owned by devtmpfs
itself there is no need to use vfs_getattr_nosec vs simply reading the
mode from the inode directly. Switch to that to avoid the bdev lookup
or any other unintentional side effect.
Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reported-by: Xiao Ni <xni@redhat.com>
Fixes: 777d0961ff95 ("fs: move the bdex_statx call to vfs_getattr_nosec")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/20250423045941.1667425-1-hch@lst.de
Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tested-by: Xiao Ni <xni@redhat.com>
Tested-by: Ayush Jain <Ayush.jain3@amd.com>
Tested-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions