Commit 6e65dc71 authored by Al Viro's avatar Al Viro Committed by Zheng Zengkai
Browse files

umount(2): move the flag validity checks first



stable inclusion
from stable-5.10.9
commit c6dc4f8e617b4c12c519d2e01305fe5e3343f01d
bugzilla: 47457

--------------------------------

commit a0a6df9a upstream.

Unfortunately, there's userland code that used to rely upon these
checks being done before anything else to check for UMOUNT_NOFOLLOW
support.  That broke in 41525f56 ("fs: refactor ksys_umount").
Separate those from the rest of checks and move them to ksys_umount();
unlike everything else in there, this can be sanely done there.

Reported-by: default avatarSargun Dhillon <sargun@sargun.me>
Fixes: 41525f56 ("fs: refactor ksys_umount")
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 819fd011
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment