projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
iommu/io-pgtable-arm: Add built time dependency
[cascardo/linux.git]
/
fs
/
posix_acl.c
diff --git
a/fs/posix_acl.c
b/fs/posix_acl.c
index
0855f77
..
3a48bb7
100644
(file)
--- a/
fs/posix_acl.c
+++ b/
fs/posix_acl.c
@@
-564,13
+564,11
@@
posix_acl_create(struct inode *dir, umode_t *mode,
*acl = posix_acl_clone(p, GFP_NOFS);
if (!*acl)
*acl = posix_acl_clone(p, GFP_NOFS);
if (!*acl)
-
return -ENOMEM
;
+
goto no_mem
;
ret = posix_acl_create_masq(*acl, mode);
ret = posix_acl_create_masq(*acl, mode);
- if (ret < 0) {
- posix_acl_release(*acl);
- return -ENOMEM;
- }
+ if (ret < 0)
+ goto no_mem_clone;
if (ret == 0) {
posix_acl_release(*acl);
if (ret == 0) {
posix_acl_release(*acl);
@@
-591,6
+589,12
@@
no_acl:
*default_acl = NULL;
*acl = NULL;
return 0;
*default_acl = NULL;
*acl = NULL;
return 0;
+
+no_mem_clone:
+ posix_acl_release(*acl);
+no_mem:
+ posix_acl_release(p);
+ return -ENOMEM;
}
EXPORT_SYMBOL_GPL(posix_acl_create);
}
EXPORT_SYMBOL_GPL(posix_acl_create);
@@
-772,7
+776,7
@@
posix_acl_xattr_get(struct dentry *dentry, const char *name,
if (!IS_POSIXACL(dentry->d_inode))
return -EOPNOTSUPP;
if (!IS_POSIXACL(dentry->d_inode))
return -EOPNOTSUPP;
- if (
S_ISLNK(dentry->d_inode->i_mode
))
+ if (
d_is_symlink(dentry
))
return -EOPNOTSUPP;
acl = get_acl(dentry->d_inode, type);
return -EOPNOTSUPP;
acl = get_acl(dentry->d_inode, type);
@@
-832,7
+836,7
@@
posix_acl_xattr_list(struct dentry *dentry, char *list, size_t list_size,
if (!IS_POSIXACL(dentry->d_inode))
return -EOPNOTSUPP;
if (!IS_POSIXACL(dentry->d_inode))
return -EOPNOTSUPP;
- if (
S_ISLNK(dentry->d_inode->i_mode
))
+ if (
d_is_symlink(dentry
))
return -EOPNOTSUPP;
if (type == ACL_TYPE_ACCESS)
return -EOPNOTSUPP;
if (type == ACL_TYPE_ACCESS)