fs: Give dentry to inode_change_ok() instead of inode
authorJan Kara <jack@suse.cz>
Thu, 26 May 2016 14:55:18 +0000 (16:55 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 20 Nov 2016 01:01:43 +0000 (01:01 +0000)
commit44b25c3e25af81daebf188ba1bc94b123ea40138
tree8e092865e5b0e5ec96babf2402cfcbcb47f7debc
parent4538dfea79538a98e1468088b05627f82ac69789
fs: Give dentry to inode_change_ok() instead of inode

commit 31051c85b5e2aaaf6315f74c72a732673632a905 upstream.

inode_change_ok() will be resposible for clearing capabilities and IMA
extended attributes and as such will need dentry. Give it as an argument
to inode_change_ok() instead of an inode. Also rename inode_change_ok()
to setattr_prepare() to better relect that it does also some
modifications in addition to checks.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
[bwh: Backported to 3.2:
 - Drop changes to f2fs, lustre, orangefs, overlayfs
 - Adjust filenames, context
 - In nfsd, pass dentry to nfsd_sanitize_attrs()
 - In xfs, pass dentry to xfs_change_file_space(), xfs_set_mode(),
   xfs_setattr_nonsize(), and xfs_setattr_size()
 - Update ext3 as well
 - Mark pohmelfs as BROKEN; it's long dead upstream]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
54 files changed:
Documentation/filesystems/porting
drivers/staging/pohmelfs/Kconfig
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/adfs/inode.c
fs/affs/inode.c
fs/attr.c
fs/btrfs/inode.c
fs/ceph/inode.c
fs/cifs/inode.c
fs/ecryptfs/inode.c
fs/exofs/inode.c
fs/ext2/inode.c
fs/ext3/inode.c
fs/ext4/inode.c
fs/fat/file.c
fs/fuse/dir.c
fs/gfs2/inode.c
fs/hfs/inode.c
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/inode.c
fs/hugetlbfs/inode.c
fs/jffs2/fs.c
fs/jfs/file.c
fs/libfs.c
fs/logfs/file.c
fs/minix/file.c
fs/ncpfs/inode.c
fs/nfsd/vfs.c
fs/nilfs2/inode.c
fs/ntfs/inode.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/file.c
fs/omfs/file.c
fs/proc/base.c
fs/proc/generic.c
fs/proc/proc_sysctl.c
fs/ramfs/file-nommu.c
fs/reiserfs/inode.c
fs/sysfs/inode.c
fs/sysv/file.c
fs/ubifs/file.c
fs/udf/file.c
fs/ufs/truncate.c
fs/utimes.c
fs/xfs/xfs_acl.c
fs/xfs/xfs_file.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.h
include/linux/fs.h
mm/shmem.c