Skip to content

Commit

Permalink
Btrfs: skip adding an acl attribute if we don't have to
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Bo authored and Chris Mason committed Dec 17, 2012
1 parent 0ff6fab commit 755ac67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans,
ret = posix_acl_equiv_mode(acl, &inode->i_mode);
if (ret < 0)
return ret;
if (ret == 0)
acl = NULL;
}
ret = 0;
break;
Expand Down

0 comments on commit 755ac67

Please sign in to comment.