Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/lustre/libcfs: remove waitq_wait

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peng Tao and committed by
Greg Kroah-Hartman
b3669a7f 9e795d35

+11 -19
-1
drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
··· 52 52 void schedule_timeout_and_set_state(long, int64_t); 53 53 54 54 int64_t waitq_timedwait(wait_queue_t *, long, int64_t); 55 - void waitq_wait(wait_queue_t *, long); 56 55 void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *); 57 56 58 57 void cfs_init_timer(struct timer_list *t);
+1 -1
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
··· 3423 3423 add_wait_queue_exclusive(&sched->ibs_waitq, &wait); 3424 3424 spin_unlock_irqrestore(&sched->ibs_lock, flags); 3425 3425 3426 - waitq_wait(&wait, TASK_INTERRUPTIBLE); 3426 + schedule(); 3427 3427 busy_loops = 0; 3428 3428 3429 3429 remove_wait_queue(&sched->ibs_waitq, &wait);
+1 -1
drivers/staging/lustre/lnet/lnet/lib-eq.c
··· 341 341 lnet_eq_wait_unlock(); 342 342 343 343 if (tms < 0) { 344 - waitq_wait(&wl, TASK_INTERRUPTIBLE); 344 + schedule(); 345 345 346 346 } else { 347 347 struct timeval tv;
+2 -2
drivers/staging/lustre/lustre/fid/fid_request.c
··· 225 225 set_current_state(TASK_UNINTERRUPTIBLE); 226 226 mutex_unlock(&seq->lcs_mutex); 227 227 228 - waitq_wait(link, TASK_UNINTERRUPTIBLE); 228 + schedule(); 229 229 230 230 mutex_lock(&seq->lcs_mutex); 231 231 remove_wait_queue(&seq->lcs_waitq, link); ··· 378 378 set_current_state(TASK_UNINTERRUPTIBLE); 379 379 mutex_unlock(&seq->lcs_mutex); 380 380 381 - waitq_wait(&link, TASK_UNINTERRUPTIBLE); 381 + schedule(); 382 382 383 383 mutex_lock(&seq->lcs_mutex); 384 384 remove_wait_queue(&seq->lcs_waitq, &link);
+1 -1
drivers/staging/lustre/lustre/include/lustre_lib.h
··· 558 558 break; \ 559 559 \ 560 560 if (__timeout == 0) { \ 561 - waitq_wait(&__wait, __wstate); \ 561 + schedule(); \ 562 562 } else { \ 563 563 cfs_duration_t interval = info->lwi_interval? \ 564 564 min_t(cfs_duration_t, \
+1 -1
drivers/staging/lustre/lustre/lclient/lcommon_cl.c
··· 1203 1203 set_current_state(TASK_UNINTERRUPTIBLE); 1204 1204 if (atomic_read(&header->loh_ref) == 1) 1205 1205 break; 1206 - waitq_wait(&waiter, TASK_UNINTERRUPTIBLE); 1206 + schedule(); 1207 1207 } 1208 1208 1209 1209 set_current_state(TASK_RUNNING);
+1 -1
drivers/staging/lustre/lustre/libcfs/debug.c
··· 379 379 printk(KERN_ERR "LustreError: cannot start log dump thread:" 380 380 " %ld\n", PTR_ERR(dumper)); 381 381 else 382 - waitq_wait(&wait, TASK_INTERRUPTIBLE); 382 + schedule(); 383 383 384 384 /* be sure to teardown if cfs_create_thread() failed */ 385 385 remove_wait_queue(&debug_ctlwq, &wait);
-7
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c
··· 70 70 } 71 71 EXPORT_SYMBOL(add_wait_queue_exclusive_head); 72 72 73 - void 74 - waitq_wait(wait_queue_t *link, long state) 75 - { 76 - schedule(); 77 - } 78 - EXPORT_SYMBOL(waitq_wait); 79 - 80 73 int64_t 81 74 waitq_timedwait(wait_queue_t *link, long state, int64_t timeout) 82 75 {
+1 -1
drivers/staging/lustre/lustre/lov/lov_object.c
··· 320 320 spin_lock(&r0->lo_sub_lock); 321 321 if (r0->lo_sub[idx] == los) { 322 322 spin_unlock(&r0->lo_sub_lock); 323 - waitq_wait(waiter, TASK_UNINTERRUPTIBLE); 323 + schedule(); 324 324 } else { 325 325 spin_unlock(&r0->lo_sub_lock); 326 326 set_current_state(TASK_RUNNING);
+1 -1
drivers/staging/lustre/lustre/obdclass/cl_lock.c
··· 943 943 * can be restarted if signals are pending here */ 944 944 result = -ERESTARTSYS; 945 945 if (likely(!OBD_FAIL_CHECK(OBD_FAIL_LOCK_STATE_WAIT_INTR))) { 946 - waitq_wait(&waiter, TASK_INTERRUPTIBLE); 946 + schedule(); 947 947 if (!cfs_signal_pending()) 948 948 result = 0; 949 949 }
+1 -1
drivers/staging/lustre/lustre/obdclass/lu_object.c
··· 712 712 * lu_object_find_try() already added waiter into the 713 713 * wait queue. 714 714 */ 715 - waitq_wait(&wait, TASK_UNINTERRUPTIBLE); 715 + schedule(); 716 716 bkt = lu_site_bkt_from_fid(dev->ld_site, (void *)f); 717 717 remove_wait_queue(&bkt->lsb_marche_funebre, &wait); 718 718 }
+1 -1
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
··· 549 549 add_wait_queue(&page_pools.epp_waitq, &waitlink); 550 550 551 551 spin_unlock(&page_pools.epp_lock); 552 - waitq_wait(&waitlink, TASK_UNINTERRUPTIBLE); 552 + schedule(); 553 553 remove_wait_queue(&page_pools.epp_waitq, &waitlink); 554 554 LASSERT(page_pools.epp_waitqlen > 0); 555 555 spin_lock(&page_pools.epp_lock);