- updates to cray plan
- remove unnecessary error handling from
mdc_completion_callback
rep->lock_policy_res1 |= IT_OPEN_NEG;
/* Negative dentry, just create the file */
- if ((rec->ur_flags & O_CREAT) && !dchild->d_inode) {
+ if (dchild->d_inode) {
+ up(&dir->i_sem);
+ if ((rec->ur_flags & (O_CREATE|O_EXCL)) == (O_CREATE|O_EXCL))
+ GOTO(out_ldput, rc = -EEXIST);
+ } else if ((rec->ur_flags & O_CREAT) && !dchild->d_inode) {
int err;
void *handle;
mds_start_transno(mds);
} else if (!dchild->d_inode) {
up(&dir->i_sem);
GOTO(out_ldput, rc = -ENOENT);
- } else {
- up(&dir->i_sem);
- }
+ }
/*
* It already exists.