projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'mvebu-irqchip-3.14' of git://git.infradead.org/linux-mvebu into irq/core
[firefly-linux-kernel-4.4.55.git]
/
fs
/
posix_acl.c
diff --git
a/fs/posix_acl.c
b/fs/posix_acl.c
index 38bae5a0ea257ebc414aef89727f3a652d904c96..11c54fd51e16d6248926287c407b06da39495231 100644
(file)
--- a/
fs/posix_acl.c
+++ b/
fs/posix_acl.c
@@
-521,8
+521,11
@@
posix_acl_chmod(struct inode *inode, umode_t mode)
return -EOPNOTSUPP;
acl = get_acl(inode, ACL_TYPE_ACCESS);
return -EOPNOTSUPP;
acl = get_acl(inode, ACL_TYPE_ACCESS);
- if (IS_ERR_OR_NULL(acl))
+ if (IS_ERR_OR_NULL(acl)) {
+ if (acl == ERR_PTR(-EOPNOTSUPP))
+ return 0;
return PTR_ERR(acl);
return PTR_ERR(acl);
+ }
ret = __posix_acl_chmod(&acl, GFP_KERNEL, mode);
if (ret)
ret = __posix_acl_chmod(&acl, GFP_KERNEL, mode);
if (ret)
@@
-544,14
+547,15
@@
posix_acl_create(struct inode *dir, umode_t *mode,
goto no_acl;
p = get_acl(dir, ACL_TYPE_DEFAULT);
goto no_acl;
p = get_acl(dir, ACL_TYPE_DEFAULT);
- if (IS_ERR(p))
+ if (IS_ERR(p)) {
+ if (p == ERR_PTR(-EOPNOTSUPP))
+ goto apply_umask;
return PTR_ERR(p);
return PTR_ERR(p);
-
- if (!p) {
- *mode &= ~current_umask();
- goto no_acl;
}
}
+ if (!p)
+ goto apply_umask;
+
*acl = posix_acl_clone(p, GFP_NOFS);
if (!*acl)
return -ENOMEM;
*acl = posix_acl_clone(p, GFP_NOFS);
if (!*acl)
return -ENOMEM;
@@
-575,6
+579,8
@@
posix_acl_create(struct inode *dir, umode_t *mode,
}
return 0;
}
return 0;
+apply_umask:
+ *mode &= ~current_umask();
no_acl:
*default_acl = NULL;
*acl = NULL;
no_acl:
*default_acl = NULL;
*acl = NULL;