Whamcloud - gitweb
Branch b1_8_gate
authorfanyong <fanyong>
Tue, 14 Oct 2008 07:17:21 +0000 (07:17 +0000)
committerfanyong <fanyong>
Tue, 14 Oct 2008 07:17:21 +0000 (07:17 +0000)
b=16947
i=huanghua
i=johann

Code cleanup and possible race conditions fix when statahead startup.

lustre/llite/llite_nfs.c

index 4afb60e..23bda69 100644 (file)
@@ -176,18 +176,7 @@ static struct dentry *ll_iget_for_nfs(struct super_block *sb, unsigned long ino,
         result->d_flags |= DCACHE_DISCONNECTED;
 
 #endif
-        ll_set_dd(result);
-
-        lock_dentry(result);
-        if (unlikely(result->d_op == &ll_init_d_ops)) {
-                result->d_op = &ll_d_ops;
-                unlock_dentry(result);
-                smp_wmb();
-                ll_d_wakeup(result);
-        } else {
-                result->d_op = &ll_d_ops;
-                unlock_dentry(result);
-        }
+        ll_dops_init(result, 1);
 
         RETURN(result);
 }