aboutsummaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 20:46:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:17:05 -0400
commite68888bcb60ccba4dc21df9f2d8cd7325b64dce7 (patch)
treebbdf38e109cc6f3533525a88c88b8e570b12ff4d /fs/reiserfs
parentd441b1c293149212045de00f346c8ea6cd41cce4 (diff)
reiserfs: minimal fix for ACL caching
reiserfs uses NULL as "unknown" and ERR_PTR(-ENODATA) as "no ACL"; several codepaths store the former instead of the latter. All those codepaths go through iset_acl() and all cases when it's called with NULL acl are for the second variety, so the minimal fix is to teach iset_acl() to deal with that. Proper fix is to switch to more usual conventions and avoid back and forth between internally used ERR_PTR(-ENODATA) and NULL expected by the rest of the kernel. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/xattr_acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index c303c426fe2..a1a7e3530e1 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -194,7 +194,7 @@ static inline void iset_acl(struct inode *inode, struct posix_acl **i_acl,
spin_lock(&inode->i_lock);
if (*i_acl != ERR_PTR(-ENODATA))
posix_acl_release(*i_acl);
- *i_acl = posix_acl_dup(acl);
+ *i_acl = acl ? posix_acl_dup(acl) : ERR_PTR(-ENODATA);
spin_unlock(&inode->i_lock);
}