aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-04-23 13:55:30 -0400
committerJosef Bacik <josef@redhat.com>2012-04-24 15:18:28 -0400
commit695095d1742a111617b0add0bf69b5f6cfe205ea (patch)
tree4c248c796997dd0728244806eee2dc5e0b7f4995
parentfd07dbb41a3848665ed72c47be01f328c7fdd250 (diff)
downloadbtrfs-work-695095d1742a111617b0add0bf69b5f6cfe205ea.tar.gz
Btrfs: cache no acl on new inodes
When running compilebench I noticed we were spending some time looking up acls on new inodes, which shouldn't be happening since there were no acls. This is because when we init acls on the inode after creating them we don't cache the fact there are no acls if there aren't any. Doing this adds a little bit of a bump to my compilebench runs. Thanks, Btrfs: cache no acl on new inodes Signed-off-by: Josef Bacik <josef@redhat.com>
-rw-r--r--fs/btrfs/acl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 89b156d85d63c9..761e2cd8fed16e 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -227,7 +227,11 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
if (ret > 0) {
/* we need an acl */
ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
+ } else {
+ cache_no_acl(inode);
}
+ } else {
+ cache_no_acl(inode);
}
failed:
posix_acl_release(acl);