Whamcloud - gitweb
Branch b1_8_gate
authoranserper <anserper>
Thu, 28 Aug 2008 14:26:50 +0000 (14:26 +0000)
committeranserper <anserper>
Thu, 28 Aug 2008 14:26:50 +0000 (14:26 +0000)
b=16676
i=Johann Lombardi (johann@sun.com)
i=Zhenyu Xu (zhenyu.xu@sun.com)

add inode locking around vfs-calling critical sections

lustre/mds/mds_join.c

index 0c3418b..40b2999 100644 (file)
@@ -325,7 +325,9 @@ static int mds_join_unlink_tail_inode(struct mds_update_record *rec,
                 le32_to_cpu(tail_lmm->lmm_magic) == LOV_MAGIC);
 
         LASSERT(de_tailparent);
+        LOCK_INODE_MUTEX(de_tailparent->d_inode);
         rc = ll_vfs_unlink(de_tailparent->d_inode, de_tail, mds->mds_vfsmnt);
+        UNLOCK_INODE_MUTEX(de_tailparent->d_inode);
 
         if (rc == 0) {
                 CDEBUG(D_INODE, "delete the tail inode %lu/%u \n",