Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-3866 hsm: permission checks on HSM operations
[fs/lustre-release.git]
/
lustre
/
mdt
/
mdt_open.c
diff --git
a/lustre/mdt/mdt_open.c
b/lustre/mdt/mdt_open.c
index
0cb4d93
..
76ed060
100644
(file)
--- a/
lustre/mdt/mdt_open.c
+++ b/
lustre/mdt/mdt_open.c
@@
-1975,6
+1975,9
@@
static int mdt_hsm_release(struct mdt_thread_info *info, struct mdt_object *o,
int rc2;
ENTRY;
+ if (exp_connect_flags(info->mti_exp) & OBD_CONNECT_RDONLY)
+ RETURN(-EROFS);
+
data = req_capsule_client_get(info->mti_pill, &RMF_CLOSE_DATA);
if (data == NULL)
RETURN(-EPROTO);