diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-20 13:42:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-15 21:23:59 -0400 |
commit | 2010464cfafb22821e39c216cb068d83c91d7d8b (patch) | |
tree | bdcc80b99bbcc67aebfaed9674f0098df7db2206 /scripts/lib | |
parent | f1f486b841c73e94167956e1885f865cac4e629f (diff) |
change calling conventions for lock_mount() et.al.
1) pinned_mountpoint gets a new member - struct mount *parent.
Set only if we locked the sucker; ERR_PTR() - on failed attempt.
2) do_lock_mount() et.al. return void and set ->parent to
* on success with !beneath - mount corresponding to path->mnt
* on success with beneath - the parent of mount corresponding
to path->mnt
* in case of error - ERR_PTR(-E...).
IOW, we get the mount we will be actually mounting upon or ERR_PTR().
3) we can't use CLASS, since the pinned_mountpoint is placed on
hlist during initialization, so we define local macros:
LOCK_MOUNT(mp, path)
LOCK_MOUNT_MAYBE_BENEATH(mp, path, beneath)
LOCK_MOUNT_EXACT(mp, path)
All of them declare and initialize struct pinned_mountpoint mp,
with unlock_mount done via __cleanup().
Users converted.
[
lock_mount() is unused now; removed.
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
]
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions