aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/acl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-17 11:46:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-17 11:46:57 -0400
commitfeb72ce827b939d5228664c92c2dfed7753cae46 (patch)
treede2d78ee45d9e0df234e98eea67ebc3a21525d8f /fs/ext4/acl.c
parent65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff)
parent5ac3455a843d2ca77333c954eea83aa4514c8199 (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/acl.c')
-rw-r--r--fs/ext4/acl.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index 647e0d65a284..605aeed96d68 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -129,12 +129,15 @@ fail:
129static inline struct posix_acl * 129static inline struct posix_acl *
130ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl) 130ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl)
131{ 131{
132 struct posix_acl *acl = EXT4_ACL_NOT_CACHED; 132 struct posix_acl *acl = ACCESS_ONCE(*i_acl);
133 133
134 spin_lock(&inode->i_lock); 134 if (acl) {
135 if (*i_acl != EXT4_ACL_NOT_CACHED) 135 spin_lock(&inode->i_lock);
136 acl = posix_acl_dup(*i_acl); 136 acl = *i_acl;
137 spin_unlock(&inode->i_lock); 137 if (acl != EXT4_ACL_NOT_CACHED)
138 acl = posix_acl_dup(acl);
139 spin_unlock(&inode->i_lock);
140 }
138 141
139 return acl; 142 return acl;
140} 143}