vfs: create a generic checking and prep function for FS_IOC_SETFLAGS
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 1 Jul 2019 15:25:34 +0000 (08:25 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 1 Jul 2019 15:25:34 +0000 (08:25 -0700)
commit5aca284210ce827f780ea2f4f9c6ab8d6e2d6648
tree485c43c3dd95105dccf7fcc32934112a76ea2129
parentd1fdb6d8f6a4109a4263176c84b899076a5f8008
vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

Create a generic function to check incoming FS_IOC_SETFLAGS flag values
and later prepare the inode for updates so that we can standardize the
implementations that follow ext4's flag values.

Note that the efivarfs implementation no longer fails a no-op SETFLAGS
without CAP_LINUX_IMMUTABLE since that's the behavior in ext*.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
14 files changed:
fs/btrfs/ioctl.c
fs/efivarfs/file.c
fs/ext2/ioctl.c
fs/ext4/ioctl.c
fs/gfs2/file.c
fs/hfsplus/ioctl.c
fs/inode.c
fs/jfs/ioctl.c
fs/nilfs2/ioctl.c
fs/ocfs2/ioctl.c
fs/orangefs/file.c
fs/reiserfs/ioctl.c
fs/ubifs/ioctl.c
include/linux/fs.h