• Christian Brauner's avatar
    fs: use a for loop when locking a mount · 64f44b27
    Christian Brauner authored
    Currently, lock_mount() uses a goto to retry the lookup until it
    succeeded in acquiring the namespace_lock() preventing the top mount
    from being overmounted. While that's perfectly fine we want to lookup
    the mountpoint on the parent of the top mount in later patches. So adapt
    the code to make this easier to implement. Also, the for loop is
    arguably a little cleaner and makes the code easier to follow. No
    functional changes intended.
    Reviewed-by: default avatarSeth Forshee (DigitalOcean) <sforshee@kernel.org>
    Message-Id: <20230202-fs-move-mount-replace-v4-3-98f3d80d7eaa@kernel.org>
    Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
    64f44b27
namespace.c 115 KB