Whamcloud - gitweb
- fill inodes if files exist
authorbraam <braam>
Thu, 30 Jan 2003 19:40:16 +0000 (19:40 +0000)
committerbraam <braam>
Thu, 30 Jan 2003 19:40:16 +0000 (19:40 +0000)
lustre/mds/mds_open.c

index 8aa472d..832bcae 100644 (file)
@@ -126,8 +126,11 @@ int mds_open(struct mds_update_record *rec, int offset,
         /* Negative dentry, just create the file */
         if (dchild->d_inode) { 
                 up(&dir->i_sem);
-               if ((rec->ur_flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
+               if ((rec->ur_flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL)) { 
+                        mds_pack_inode2fid(&body->fid1, dchild->d_inode);
+                        mds_pack_inode2body(body, dchild->d_inode);
                        GOTO(out_ldput, rc = -EEXIST);
+                }
         } else if ((rec->ur_flags & O_CREAT) && !dchild->d_inode) {
                 int err;
                 void *handle;