diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-10-08 11:06:08 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-10-08 11:06:08 -0400 |
commit | e55f1d1d13e7f1c364672d667d78fd1f640ab9f9 (patch) | |
tree | 406a3c127abb008f2f736c8d2ee03fc3c2926d6b /fs/ocfs2 | |
parent | f334bcd94b7d3c0fbc34d518a86548f451ab5faf (diff) | |
parent | 030b533c4fd4d2ec3402363323de4bb2983c9cee (diff) | |
download | linux-e55f1d1d13e7f1c364672d667d78fd1f640ab9f9.tar.bz2 |
Merge remote-tracking branch 'jk/vfs' into work.misc
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/acl.c | 10 | ||||
-rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index 2162434728c0..164307b99405 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c @@ -241,13 +241,11 @@ int ocfs2_set_acl(handle_t *handle, case ACL_TYPE_ACCESS: name_index = OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS; if (acl) { - umode_t mode = inode->i_mode; - ret = posix_acl_equiv_mode(acl, &mode); - if (ret < 0) - return ret; + umode_t mode; - if (ret == 0) - acl = NULL; + ret = posix_acl_update_mode(inode, &mode, &acl); + if (ret) + return ret; ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode); diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index ef474cdd6404..6a4b21654037 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c @@ -211,7 +211,7 @@ static int dlmfs_file_setattr(struct dentry *dentry, struct iattr *attr) struct inode *inode = d_inode(dentry); attr->ia_valid &= ~ATTR_SIZE; - error = inode_change_ok(inode, attr); + error = setattr_prepare(dentry, attr); if (error) return error; diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 0b055bfb8e86..8a7eb81dcdfc 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1155,7 +1155,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) if (!(attr->ia_valid & OCFS2_VALID_ATTRS)) return 0; - status = inode_change_ok(inode, attr); + status = setattr_prepare(dentry, attr); if (status) return status; |