提交 d5bb68ad 编写于 作者: A Al Viro

another race fix in jfs_check_acl()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 72c04902
......@@ -118,15 +118,16 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
static int jfs_check_acl(struct inode *inode, int mask)
{
if (inode->i_acl == ACL_NOT_CACHED) {
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl))
return PTR_ERR(acl);
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl))
return PTR_ERR(acl);
if (acl) {
int error = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
return error;
}
if (inode->i_acl)
return posix_acl_permission(inode, inode->i_acl, mask);
return -EAGAIN;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册