set "IT_CREAT" in the default intent(oit) in function
ll_file_open(llite/file.c) if "it_flags" contains O_CREAT
i=johann@sun.com
i=alexey.lyashkov@sun.com
* already? XXX - NFS implications? */
oit.it_flags &= ~O_EXCL;
+ /* bug20584, if "it_flags" contains O_CREAT, the file will be
+ * created if necessary, then "IT_CREAT" should be set to keep
+ * consistent with it */
+ if (oit.it_flags & O_CREAT)
+ oit.it_op |= IT_CREAT;
+
it = &oit;
}
if (rc)
GOTO(cleanup, rc);
+ if (IS_DEADDIR((*dparentp)->d_inode))
+ GOTO(cleanup, -ENOENT);
+
/* Step 4: Re-lookup child to verify it hasn't changed since locking */
rc = mds_verify_child(obd, &parent_res_id, parent_lockh, *dparentp,
parent_mode, &child_res_id, child_lockh, dchildp,