Whamcloud - gitweb
b=6942
authoralex <alex>
Thu, 23 Jun 2005 12:26:15 +0000 (12:26 +0000)
committeralex <alex>
Thu, 23 Jun 2005 12:26:15 +0000 (12:26 +0000)
 - don't take inode->i_sem. otherwise we deadlock because right ordering
   is i_sem then journal_strart. as we're creating the file, nobody can
   access it. so it's safe to set fid w/o i_sem

lustre/mds/mds_open.c

index 2f45a66..5a28534 100644 (file)
@@ -1251,7 +1251,6 @@ got_child:
                         MD_COUNTER_INCREMENT(obd, create);
                 }
 
-                down(&dchild->d_inode->i_sem);
                 if (ino) {
                         rc = mds_update_inode_sid(obd, dchild->d_inode,
                                                   handle, rec->ur_id2);
@@ -1273,8 +1272,7 @@ got_child:
                                        "rc = %d\n", rc);
                         }
                 }
-                up(&dchild->d_inode->i_sem);
-                
+
                 if (!(rec->ur_flags & O_EXCL)) { /* bug 3313 */
                         rc = fsfilt_commit(obd, dchild->d_inode->i_sb,
                                            dchild->d_inode, handle,