diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-17 08:46:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-17 08:46:57 -0700 |
commit | feb72ce827b939d5228664c92c2dfed7753cae46 (patch) | |
tree | de2d78ee45d9e0df234e98eea67ebc3a21525d8f /fs/ext4 | |
parent | 65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff) | |
parent | 5ac3455a843d2ca77333c954eea83aa4514c8199 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
get rid of BKL in fs/sysv
get rid of BKL in fs/minix
get rid of BKL in fs/efs
befs ->pust_super() doesn't need BKL
Cleanup of adfs headers
9P doesn't need BKL in ->umount_begin()
fuse doesn't need BKL in ->umount_begin()
No instance of ->bmap() needs BKL
remove unlock_kernel() left accidentally
ext4: avoid unnecessary spinlock in critical POSIX ACL path
ext3: avoid unnecessary spinlock in critical POSIX ACL path
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/acl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index 647e0d65a28..605aeed96d6 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c @@ -129,12 +129,15 @@ fail: static inline struct posix_acl * ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl) { - struct posix_acl *acl = EXT4_ACL_NOT_CACHED; + struct posix_acl *acl = ACCESS_ONCE(*i_acl); - spin_lock(&inode->i_lock); - if (*i_acl != EXT4_ACL_NOT_CACHED) - acl = posix_acl_dup(*i_acl); - spin_unlock(&inode->i_lock); + if (acl) { + spin_lock(&inode->i_lock); + acl = *i_acl; + if (acl != EXT4_ACL_NOT_CACHED) + acl = posix_acl_dup(acl); + spin_unlock(&inode->i_lock); + } return acl; } |