Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e1df480
)
LU-998 acl: declare acl operation for setattr
author
Lai Siyao
<laisiyao@whamcloud.com>
Wed, 18 Jan 2012 07:46:24 +0000
(15:46 +0800)
committer
Oleg Drokin
<green@whamcloud.com>
Fri, 3 Feb 2012 01:59:30 +0000
(20:59 -0500)
Setattr on ATTR_MODE may set acl if acl is enabled, and it should be
declared in advance.
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Id9c94c5498f8fee0a79986bb424444f658c98e60
Reviewed-on: http://review.whamcloud.com/1984
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_object.c
patch
|
blob
|
history
diff --git
a/lustre/mdd/mdd_object.c
b/lustre/mdd/mdd_object.c
index
ace6de2
..
cf17146
100644
(file)
--- a/
lustre/mdd/mdd_object.c
+++ b/
lustre/mdd/mdd_object.c
@@
-1514,6
+1514,29
@@
static int mdd_declare_attr_set(const struct lu_env *env,
return rc;
}
return rc;
}
+#ifdef CONFIG_FS_POSIX_ACL
+ if (ma->ma_attr.la_valid & LA_MODE) {
+ mdd_read_lock(env, obj, MOR_TGT_CHILD);
+ rc = mdo_xattr_get(env, obj, buf, XATTR_NAME_ACL_ACCESS,
+ BYPASS_CAPA);
+ mdd_read_unlock(env, obj);
+ if (rc == -EOPNOTSUPP || rc == -ENODATA)
+ rc = 0;
+ else if (rc < 0)
+ return rc;
+
+ if (rc != 0) {
+ buf->lb_buf = NULL;
+ buf->lb_len = rc;
+ rc = mdo_declare_xattr_set(env, obj, buf,
+ XATTR_NAME_ACL_ACCESS, 0,
+ handle);
+ if (rc)
+ return rc;
+ }
+ }
+#endif
+
/* basically the log is the same as in unlink case */
if (lmm) {
__u16 stripe;
/* basically the log is the same as in unlink case */
if (lmm) {
__u16 stripe;