Skip to content

Commit

Permalink
reiserfs: cache negative ACLs for v1 stat format
Browse files Browse the repository at this point in the history
Always set up a negative ACL cache entry if the inode can't have ACLs.
That behaves much better than doing this check inside ->check_acl.

Also remove the left over MAY_NOT_BLOCK check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jul 25, 2011
1 parent 6311b10 commit 4482a08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 5 additions & 0 deletions fs/reiserfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,11 @@ void reiserfs_read_locked_inode(struct inode *inode,

reiserfs_check_path(&path_to_sd); /* init inode should be relsing */

/*
* Stat data v1 doesn't support ACLs.
*/
if (get_inode_sd_version(inode) == STAT_DATA_V1)
cache_no_acl(inode);
}

/**
Expand Down
9 changes: 0 additions & 9 deletions fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,15 +872,6 @@ int reiserfs_check_acl(struct inode *inode, int mask)
struct posix_acl *acl;
int error = -EAGAIN; /* do regular unix permission checks by default */

/*
* Stat data v1 doesn't support ACLs.
*/
if (get_inode_sd_version(inode) == STAT_DATA_V1)
return -EAGAIN;

if (mask & MAY_NOT_BLOCK)
return -ECHILD;

acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);

if (acl) {
Expand Down

0 comments on commit 4482a08

Please sign in to comment.