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-10337 mdt: Allow open of open orphans
[fs/lustre-release.git]
/
lustre
/
mdd
/
mdd_object.c
diff --git
a/lustre/mdd/mdd_object.c
b/lustre/mdd/mdd_object.c
index
3fedd2d
..
1025a0d
100644
(file)
--- a/
lustre/mdd/mdd_object.c
+++ b/
lustre/mdd/mdd_object.c
@@
-2988,8
+2988,11
@@
static int mdd_open_sanity_check(const struct lu_env *env,
int mode, rc;
ENTRY;
int mode, rc;
ENTRY;
- /* EEXIST check */
- if (mdd_is_dead_obj(obj))
+ /* EEXIST check, also opening of *open* orphans is allowed so we can
+ * open-by-handle unlinked files
+ */
+ if (mdd_is_dead_obj(obj) &&
+ likely(!(mdd_is_orphan_obj(obj) && obj->mod_count > 0)))
RETURN(-ENOENT);
if (S_ISLNK(attr->la_mode))
RETURN(-ENOENT);
if (S_ISLNK(attr->la_mode))