mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
another race fix in jfs_check_acl()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
72c04902d1
commit
d5bb68adda
1 changed files with 7 additions and 6 deletions
13
fs/jfs/acl.c
13
fs/jfs/acl.c
|
@ -118,15 +118,16 @@ out:
|
||||||
|
|
||||||
static int jfs_check_acl(struct inode *inode, int mask)
|
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);
|
||||||
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
|
|
||||||
if (IS_ERR(acl))
|
if (IS_ERR(acl))
|
||||||
return PTR_ERR(acl);
|
return PTR_ERR(acl);
|
||||||
|
if (acl) {
|
||||||
|
int error = posix_acl_permission(inode, acl, mask);
|
||||||
posix_acl_release(acl);
|
posix_acl_release(acl);
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inode->i_acl)
|
|
||||||
return posix_acl_permission(inode, inode->i_acl, mask);
|
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue