提交 30f8fe3e 编写于 作者: J Josef Bacik

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: NJosef Bacik <josef@redhat.com>
上级 0c4d2d95
...@@ -227,7 +227,11 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans, ...@@ -227,7 +227,11 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
if (ret > 0) { if (ret > 0) {
/* we need an acl */ /* we need an acl */
ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS); ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
} else {
cache_no_acl(inode);
} }
} else {
cache_no_acl(inode);
} }
failed: failed:
posix_acl_release(acl); posix_acl_release(acl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册