diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-11-01 12:01:20 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-11-01 12:01:20 +0800 |
| commit | 79df8fa79b6a2aced892ad2b2c9832e7d9bdea6b (patch) | |
| tree | 725b3b29e466e846837cf56cec1bafd99fe5ca71 /fs/ext2/acl.c | |
| parent | c11a255c622e7a2d312f4080c6ef529dd67b3c38 (diff) | |
| parent | 1714a3e139090705a0bd862a8b7bba930181cfbd (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'fs/ext2/acl.c')
| -rw-r--r-- | fs/ext2/acl.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 27695e6f4e46..d6aeb84e90b6 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c @@ -193,15 +193,11 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) case ACL_TYPE_ACCESS: name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; if (acl) { - error = posix_acl_equiv_mode(acl, &inode->i_mode); - if (error < 0) + error = posix_acl_update_mode(inode, &inode->i_mode, &acl); + if (error) return error; - else { - inode->i_ctime = CURRENT_TIME_SEC; - mark_inode_dirty(inode); - if (error == 0) - acl = NULL; - } + inode->i_ctime = CURRENT_TIME_SEC; + mark_inode_dirty(inode); } break; |
