Skip to content

Commit

Permalink
reiserfs: minimal fix for ACL caching
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Al Viro committed Jun 24, 2009
1 parent d441b1c commit e68888b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/reiserfs/xattr_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e68888b

Please sign in to comment.