diff options
author | Jan Kara <jack@suse.cz> | 2016-05-26 16:55:18 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-11-20 01:01:43 +0000 |
commit | 44b25c3e25af81daebf188ba1bc94b123ea40138 (patch) | |
tree | 8e092865e5b0e5ec96babf2402cfcbcb47f7debc /fs/ufs | |
parent | 4538dfea79538a98e1468088b05627f82ac69789 (diff) | |
download | linux-stable-44b25c3e25af81daebf188ba1bc94b123ea40138.tar.gz linux-stable-44b25c3e25af81daebf188ba1bc94b123ea40138.tar.bz2 linux-stable-44b25c3e25af81daebf188ba1bc94b123ea40138.zip |
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>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/truncate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index f04f89fbd4d9..92cde998aead 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -496,7 +496,7 @@ int ufs_setattr(struct dentry *dentry, struct iattr *attr) unsigned int ia_valid = attr->ia_valid; int error; - error = inode_change_ok(inode, attr); + error = setattr_prepare(dentry, attr); if (error) return error; |