Skip to content

Commit 4482a08

Browse files
Christoph HellwigAl Viro
authored andcommitted
reiserfs: cache negative ACLs for v1 stat format
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>
1 parent 6311b10 commit 4482a08

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎fs/reiserfs/inode.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,11 @@ void reiserfs_read_locked_inode(struct inode *inode,
14751475

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

1478+
/*
1479+
* Stat data v1 doesn't support ACLs.
1480+
*/
1481+
if (get_inode_sd_version(inode) == STAT_DATA_V1)
1482+
cache_no_acl(inode);
14781483
}
14791484

14801485
/**

‎fs/reiserfs/xattr.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -872,15 +872,6 @@ int reiserfs_check_acl(struct inode *inode, int mask)
872872
struct posix_acl *acl;
873873
int error = -EAGAIN; /* do regular unix permission checks by default */
874874

875-
/*
876-
* Stat data v1 doesn't support ACLs.
877-
*/
878-
if (get_inode_sd_version(inode) == STAT_DATA_V1)
879-
return -EAGAIN;
880-
881-
if (mask & MAY_NOT_BLOCK)
882-
return -ECHILD;
883-
884875
acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
885876

886877
if (acl) {

0 commit comments

Comments
 (0)