Whamcloud - gitweb
Move obd_getattr from ll_lookup2 to ll_read_inode2
[fs/lustre-release.git] / lustre / llite / commit_callback.c
index 67592f5..1f2c288 100644 (file)
@@ -44,11 +44,8 @@ static int ll_commitcbd_check_event(struct ll_sb_info *sbi)
                 GOTO(out, rc = 1);
         }
 
-        if (!list_empty(&sbi->ll_commitcbd_not_committed))
-                GOTO(out, rc = 1);
-
  out:
-        spin_unlock(&mgr->mgr_lock); 
+        spin_unlock(&sbi->ll_commitcbd_lock);
         RETURN(rc);
 }
 
@@ -76,21 +73,20 @@ static int ll_commitcbd_main(void *arg)
 
         /* And now, loop forever on requests */
         while (1) {
-                wait_event_interruptible
-                        (sbi->ll_commitcbd_waitq, 
-                         ll_commitcbd_check_event(sbi));
+                wait_event(sbi->ll_commitcbd_waitq, 
+                           ll_commitcbd_check_event(sbi));
 
                 spin_lock(&sbi->ll_commitcbd_lock);
                 if (sbi->ll_commitcbd_flags & LL_COMMITCBD_STOPPING) {
                         spin_unlock(&sbi->ll_commitcbd_lock);
-                        CERROR("lustre_hamgr quitting\n"); 
+                        CERROR("lustre_commitd quitting\n"); 
                         EXIT;
                         break;
                 }
 
                 schedule_timeout(sbi->ll_commitcbd_timeout);
                 CERROR("commit callback daemon woken up - FIXME\n"); 
-                spin_unlock(&mgr->mgr_lock);
+                spin_unlock(&sbi->ll_commitcbd_lock);
         }
 
         sbi->ll_commitcbd_thread = NULL;
@@ -100,6 +96,8 @@ static int ll_commitcbd_main(void *arg)
         RETURN(0);
 }
 
+
+
 int ll_commitcbd_setup(struct ll_sb_info *sbi)
 {
         int rc;
@@ -122,8 +120,7 @@ int ll_commitcbd_cleanup(struct ll_sb_info *sbi)
         sbi->ll_commitcbd_flags = LL_COMMITCBD_STOPPING;
 
         wake_up(&sbi->ll_commitcbd_waitq);
-        wait_event_interruptible
-                (sbi->ll_commitcbd_ctl_waitq,
-                 sbi->ll_commitcbd_flags & LL_COMMITCBD_STOPPED);
+        wait_event(sbi->ll_commitcbd_ctl_waitq,
+                   sbi->ll_commitcbd_flags & LL_COMMITCBD_STOPPED);
         RETURN(0);
 }