diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2012-11-28 05:43:11 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:15 -0500 |
commit | 755ac67f83e515af55adbfe55134eb7d90839cdb (patch) | |
tree | 56edd78dca4d3cbed1e7debc00618c1ded531c0e /fs/btrfs/acl.c | |
parent | 0ff6fabdb0a862b22df4dd75873578392478e64d (diff) |
Btrfs: skip adding an acl attribute if we don't have to
If the acl can be exactly represented in the traditional file
mode permission bits, we don't set another acl attribute.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r-- | fs/btrfs/acl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 0c16e3dbfd56..e15d2b0d8d3b 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -121,6 +121,8 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans, | |||
121 | ret = posix_acl_equiv_mode(acl, &inode->i_mode); | 121 | ret = posix_acl_equiv_mode(acl, &inode->i_mode); |
122 | if (ret < 0) | 122 | if (ret < 0) |
123 | return ret; | 123 | return ret; |
124 | if (ret == 0) | ||
125 | acl = NULL; | ||
124 | } | 126 | } |
125 | ret = 0; | 127 | ret = 0; |
126 | break; | 128 | break; |