Whamcloud - gitweb
LU-3539 protocol: Change UPDATE_OBJ RPC format
[fs/lustre-release.git] / lustre / include / lustre_mds.h
index 9ec8424..6c6e164 100644 (file)
@@ -69,8 +69,8 @@ struct mds_capa_info {
 
 static inline int md_should_create(__u64 flags)
 {
-       return !(flags & MDS_OPEN_DELAY_CREATE ||
-               !(flags & FMODE_WRITE));
+       return !(flags & MDS_OPEN_DELAY_CREATE) && (flags & FMODE_WRITE) &&
+               !(flags & MDS_OPEN_LEASE);
 }
 
 /* these are local flags, used only on the client, private */