diff options
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/acl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index d81ef2fdb08e..e0c745451715 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c | |||
@@ -129,12 +129,15 @@ fail: | |||
129 | static inline struct posix_acl * | 129 | static inline struct posix_acl * |
130 | ext3_iget_acl(struct inode *inode, struct posix_acl **i_acl) | 130 | ext3_iget_acl(struct inode *inode, struct posix_acl **i_acl) |
131 | { | 131 | { |
132 | struct posix_acl *acl = EXT3_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 != EXT3_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 != EXT3_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 | } |