]> Gentwo Git Trees - linux/.git/commit
finish_automount(): take the lock_mount() analogue into a helper
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 22 Aug 2025 16:59:10 +0000 (12:59 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Sep 2025 23:35:59 +0000 (19:35 -0400)
commit9bf5d488529b9efa01bd292633482acd10277b90
treeaa945a59dfda9975b82f11be735088bf54b1db82
parent6bbbc4a04a10ebdb633501dc87aac5b0d6b80ec8
finish_automount(): take the lock_mount() analogue into a helper

finish_automount() can't use lock_mount() - it treats finding something
already mounted as "quitely drop our mount and return 0", not as
"mount on top of whatever mounted there".  It's been open-coded;
let's take it into a helper similar to lock_mount().  "something's
already mounted" => -EBUSY, finish_automount() needs to distinguish
it from the normal case and it can't happen in other failure cases.

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