Josef Bacik fa09200b83 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>
2011-07-11 09:58:45 -04:00
..
2011-05-28 07:00:39 -04:00
2008-09-25 11:04:06 -04:00
2011-05-28 07:00:39 -04:00
2011-06-04 08:11:22 -04:00
2011-05-26 17:52:15 -04:00
2010-12-22 23:15:47 +08:00
2011-05-06 12:34:03 +02:00
2011-05-06 12:34:03 +02:00
2011-05-06 12:34:03 +02:00
2011-05-06 12:34:03 +02:00
2011-06-17 13:36:58 -04:00
2011-06-17 14:54:18 -04:00
2011-05-28 07:00:39 -04:00