Skip to contentSkip to conversation

Btrfs: cache no acl on new inodes

PATCH New Josef Bacik 1 participant 1 message Apr 23, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 fs/btrfs/acl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
fs/btrfs/acl.c +4 -0
index 89b156d..761e2cd 100644
@@ -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);
Signature · 1 line
1.7.7.6