Whamcloud - gitweb
Branch b_new_cmd
authorvitaly <vitaly>
Mon, 27 Nov 2006 14:48:53 +0000 (14:48 +0000)
committervitaly <vitaly>
Mon, 27 Nov 2006 14:48:53 +0000 (14:48 +0000)
b=22564,11103

check if unhashed and rehash under the dcache lock.
print epoch to be closed properly.

lustre/llite/llite_close.c
lustre/llite/namei.c

index 5200e09..f91fb63 100644 (file)
@@ -123,7 +123,7 @@ void ll_epoch_close(struct inode *inode, struct md_op_data *op_data,
         }
 
         CDEBUG(D_INODE, "Epoch "LPU64" closed on "DFID"\n",
-               op_data->op_ioepoch, PFID(&lli->lli_fid));
+               ll_i2info(inode)->lli_ioepoch, PFID(&lli->lli_fid));
         op_data->op_flags |= MF_EPOCH_CLOSE;
 
         if (flags & LLIF_DONE_WRITING) {
index d9ab059..2f99872 100644 (file)
@@ -684,8 +684,10 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
         /* Negative dentry may be unhashed if parent does not have UPDATE lock,
          * but some callers, e.g. do_coredump, expect dentry to be hashed after
          * successful create. Hash it here. */
+        spin_lock(&dcache_lock);
         if (d_unhashed(dentry))
-                d_rehash(dentry);
+                __d_rehash(dentry, 0);
+        spin_unlock(&dcache_lock);
         RETURN(0);
 }