fs: add generic helper for filling statx attribute flags
authorAmir Goldstein <amir73il@gmail.com>
Sat, 19 Jun 2021 09:26:16 +0000 (12:26 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 17 Aug 2021 09:47:43 +0000 (11:47 +0200)
commit4f911138c8da94bcff84f1d093d28e378703c43f
tree5e60f8b85f273a6599ad0b52165b84af91189a2b
parent7c60610d476766e128cc4284bb6349732cbd6606
fs: add generic helper for filling statx attribute flags

The immutable and append-only properties on an inode are published on
the inode's i_flags and enforced by the VFS.

Create a helper to fill the corresponding STATX_ATTR_ flags in the kstat
structure from the inode's i_flags.

Only orange was converted to use this helper.
Other filesystems could use it in the future.

Suggested-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/orangefs/inode.c
fs/stat.c
include/linux/fs.h
include/linux/stat.h