ovl: use generic vfs_ioc_setflags_prepare() helper
authorAmir Goldstein <amir73il@gmail.com>
Tue, 29 Sep 2020 07:28:48 +0000 (15:28 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 6 Oct 2020 13:38:15 +0000 (15:38 +0200)
commitbe4df0cea08a8b59eb38d73de988b7ba8022df41
tree46ca211e654e6bb65b9a8bf7f99c9126fd8ba4f9
parent61536bed2149b082748f8a38c593d915ff3e5957
ovl: use generic vfs_ioc_setflags_prepare() helper

Canonalize to ioctl FS_* flags instead of inode S_* flags.

Note that we do not call the helper vfs_ioc_fssetxattr_check()
for FS_IOC_FSSETXATTR ioctl. The reason is that underlying filesystem
will perform all the checks. We only need to perform the capability
check before overriding credentials.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c