diff options
Diffstat (limited to 'fs/gfs2/acl.c')
-rw-r--r-- | fs/gfs2/acl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 1be3b061c05c..ff0ac96a8e7b 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c | |||
@@ -79,17 +79,11 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
79 | if (type == ACL_TYPE_ACCESS) { | 79 | if (type == ACL_TYPE_ACCESS) { |
80 | umode_t mode = inode->i_mode; | 80 | umode_t mode = inode->i_mode; |
81 | 81 | ||
82 | error = posix_acl_equiv_mode(acl, &mode); | 82 | error = posix_acl_update_mode(inode, &inode->i_mode, &acl); |
83 | if (error < 0) | 83 | if (error) |
84 | return error; | 84 | return error; |
85 | 85 | if (mode != inode->i_mode) | |
86 | if (error == 0) | ||
87 | acl = NULL; | ||
88 | |||
89 | if (mode != inode->i_mode) { | ||
90 | inode->i_mode = mode; | ||
91 | mark_inode_dirty(inode); | 86 | mark_inode_dirty(inode); |
92 | } | ||
93 | } | 87 | } |
94 | 88 | ||
95 | if (acl) { | 89 | if (acl) { |