diff options
author | Jan Kara <jack@suse.cz> | 2016-05-26 14:46:43 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-02-23 03:53:52 +0000 |
commit | e043e711a028a94906d2e28efd19a364842ea61b (patch) | |
tree | d9b79b54582178ffb131f0dd34759394d72c664b /fs/xfs/xfs_ioctl.c | |
parent | 1c608c2d1aefca2bf63497663e17cfb49e6b022c (diff) | |
download | linux-stable-e043e711a028a94906d2e28efd19a364842ea61b.tar.gz linux-stable-e043e711a028a94906d2e28efd19a364842ea61b.tar.bz2 linux-stable-e043e711a028a94906d2e28efd19a364842ea61b.zip |
xfs: Propagate dentry down to inode_change_ok()
commit 69bca80744eef58fa155e8042996b968fec17b26 upstream.
To avoid clearing of capabilities or security related extended
attributes too early, inode_change_ok() will need to take dentry instead
of inode. Propagate dentry down to functions calling inode_change_ok().
This is rather straightforward except for xfs_set_mode() function which
does not have dentry easily available. Luckily that function does not
call inode_change_ok() anyway so we just have to do a little dance with
function prototypes.
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
[bwh: Backported to 3.16:
- Keep XFS_ERROR() calls
- Adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index afc859f44d01..dd2ef05fe64c 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -717,7 +717,7 @@ xfs_ioc_space( iattr.ia_valid = ATTR_SIZE; iattr.ia_size = bf->l_start; - error = xfs_setattr_size(ip, &iattr); + error = xfs_vn_setattr_size(filp->f_dentry, &iattr); if (!error) clrprealloc = true; break; |