diff options
author | Jan Stancek <jstancek@redhat.com> | 2025-04-10 17:05:42 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-04-11 16:07:50 +0200 |
commit | 47a742fd977a7a8c39fea890712e9bfdf76f98f1 (patch) | |
tree | ef084eeca6868ec068d9d48ee0db788aa7f68ec0 /rust/helpers/platform.c | |
parent | 8e3c15ee0d292c413c66fe10201d1b035a0bea72 (diff) | |
download | linux-47a742fd977a7a8c39fea890712e9bfdf76f98f1.tar.gz linux-47a742fd977a7a8c39fea890712e9bfdf76f98f1.tar.bz2 linux-47a742fd977a7a8c39fea890712e9bfdf76f98f1.zip |
fs: use namespace_{lock,unlock} in dissolve_on_fput()
In commit b73ec10a4587 ("fs: add fastpath for dissolve_on_fput()"),
the namespace_{lock,unlock} has been replaced with scoped_guard
using the namespace_sem. This however now also skips processing of
'unmounted' list in namespace_unlock(), and mount is not (immediately)
cleaned up.
For example, this causes LTP move_mount02 fail:
...
move_mount02.c:80: TPASS: invalid-from-fd: move_mount() failed as expected: EBADF (9)
move_mount02.c:80: TPASS: invalid-from-path: move_mount() failed as expected: ENOENT (2)
move_mount02.c:80: TPASS: invalid-to-fd: move_mount() failed as expected: EBADF (9)
move_mount02.c:80: TPASS: invalid-to-path: move_mount() failed as expected: ENOENT (2)
move_mount02.c:80: TPASS: invalid-flags: move_mount() failed as expected: EINVAL (22)
tst_test.c:1833: TINFO: === Testing on ext3 ===
tst_test.c:1170: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.47.2 (1-Jan-2025)
/dev/loop0 is apparently in use by the system; will not make a filesystem here!
tst_test.c:1170: TBROK: mkfs.ext3 failed with exit code 1
The test makes number of move_mount() calls but these are all designed to fail
with specific errno. Even after test, 'losetup -d' can't detach loop device.
Define a new guard for dissolve_on_fput, that will use namespace_{lock,unlock}.
Fixes: b73ec10a4587 ("fs: add fastpath for dissolve_on_fput()")
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Link: https://lore.kernel.org/cad2f042b886bf0ced3d8e3aff120ec5e0125d61.1744297468.git.jstancek@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions