]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
simplify the callers of mnt_unhold_writers()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Aug 2025 17:46:33 +0000 (13:46 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Sep 2025 19:58:28 +0000 (15:58 -0400)
commit7f954a6f491088f18a6c7c975da8ddc8c003e518
tree863f9c4c80107177f4be7763f244cb981275c555
parentd7b7253a0adc6e24869ef74a2085767cb11eb6fc
simplify the callers of mnt_unhold_writers()

The logics in cleanup on failure in mount_setattr_prepare() is simplified
by having the mnt_hold_writers() failure followed by advancing m to the
next node in the tree before leaving the loop.

And since all calls are preceded by the same check that flag has been set
and the function is inlined, let's just shift the check into it.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c