summaryrefslogtreecommitdiffstats
path: root/drivers/zorro/zorro.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-05-27 18:06:11 +0200
committerJosef Bacik <josef@redhat.com>2011-07-11 15:58:45 +0200
commitfa09200b8334f9a6af3f656edae924a98d85630f (patch)
tree9213ac48212f70d86fb60834beb464d68be332ba /drivers/zorro/zorro.h
parentbtrfs: fix oops when doing space balance (diff)
downloadlinux-fa09200b8334f9a6af3f656edae924a98d85630f.tar.xz
linux-fa09200b8334f9a6af3f656edae924a98d85630f.zip
Btrfs: try to only do one btrfs_search_slot in do_setxattr
I've been watching how many btrfs_search_slot()'s we do and I noticed that when we create a file with selinux enabled we were doing 2 each time we initialize the security context. That's because we lookup the xattr first so we can delete it if we're setting a new value to an existing xattr. But in the create case we don't have any xattrs, so it is completely useless to have the extra lookup. So re-arrange things so that we only lookup first if we specifically have XATTR_REPLACE. That way in the basic case we only do 1 search, and in the more complicated case we do the normal 2 lookups. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'drivers/zorro/zorro.h')
0 files changed, 0 insertions, 0 deletions