Whamcloud - gitweb
b=20139 prevent parent thread to be killed before its child becoming daemon
authorFan Yong <Yong.Fan@Sun.COM>
Thu, 14 Jan 2010 02:34:48 +0000 (10:34 +0800)
committerJohann Lombardi <johann@sun.com>
Thu, 14 Jan 2010 11:12:20 +0000 (12:12 +0100)
Prevent parent thread to be killed before its child becoming daemon.

i=tappro
i=robert

lustre/llite/statahead.c

index 70bb52e..9553336 100644 (file)
@@ -1008,7 +1008,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup)
         struct ll_inode_info     *lli;
         struct ll_statahead_info *sai;
         struct dentry            *parent;
-        struct l_wait_info        lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
+        struct l_wait_info        lwi = { 0 };
         int                       rc = 0;
         ENTRY;
 
@@ -1059,6 +1059,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup)
                         /*
                          * thread started already, avoid double-stat.
                          */
+                        lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
                         rc = l_wait_event(sai->sai_waitq,
                                           ll_sai_entry_stated(sai) ||
                                           sa_is_stopped(sai),