projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git]
/
fs
/
ceph
/
acl.c
diff --git
a/fs/ceph/acl.c
b/fs/ceph/acl.c
index
4f67227
..
987044b
100644
(file)
--- a/
fs/ceph/acl.c
+++ b/
fs/ceph/acl.c
@@
-95,11
+95,9
@@
int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
if (acl) {
case ACL_TYPE_ACCESS:
name = XATTR_NAME_POSIX_ACL_ACCESS;
if (acl) {
- ret = posix_acl_
equiv_mode(acl, &new_mode
);
- if (ret
< 0
)
+ ret = posix_acl_
update_mode(inode, &new_mode, &acl
);
+ if (ret)
goto out;
goto out;
- if (ret == 0)
- acl = NULL;
}
break;
case ACL_TYPE_DEFAULT:
}
break;
case ACL_TYPE_DEFAULT:
@@
-127,6
+125,11
@@
int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
goto out_free;
}
goto out_free;
}
+ if (ceph_snap(inode) != CEPH_NOSNAP) {
+ ret = -EROFS;
+ goto out_free;
+ }
+
if (new_mode != old_mode) {
newattrs.ia_mode = new_mode;
newattrs.ia_valid = ATTR_MODE;
if (new_mode != old_mode) {
newattrs.ia_mode = new_mode;
newattrs.ia_valid = ATTR_MODE;