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>
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 2922b90..9b0d4b7 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c
@@ -1475,6 +1475,11 @@ 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); } /**
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 6938d8c..7ba083e 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c
@@ -872,15 +872,6 @@ 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) {