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
(parent:
7f8ffff
)
Check WRITE permission of parent when create.
author
fanyong
<fanyong>
Mon, 6 Nov 2006 07:19:06 +0000
(07:19 +0000)
committer
fanyong
<fanyong>
Mon, 6 Nov 2006 07:19:06 +0000
(07:19 +0000)
lustre/mdd/mdd_dir.c
patch
|
blob
|
history
diff --git
a/lustre/mdd/mdd_dir.c
b/lustre/mdd/mdd_dir.c
index
8b3b5f8
..
76b1de5
100644
(file)
--- a/
lustre/mdd/mdd_dir.c
+++ b/
lustre/mdd/mdd_dir.c
@@
-1010,6
+1010,13
@@
static int mdd_create_sanity_check(const struct lu_env *env,
MAY_WRITE | MAY_EXEC);
if (rc != -ENOENT)
RETURN(rc ? : -EEXIST);
+ } else {
+ /*
+ * Check if has WRITE permission for the parent.
+ */
+ rc = mdd_permission_internal_locked(env, obj, MAY_WRITE);
+ if (rc)
+ RETURN(rc);
}
/* sgid check */