Whamcloud - gitweb
LU-3204 build: clean up unused variables and dead code
[fs/lustre-release.git] / lustre / ptlrpc / client.c
index 4fe79db..8b355e7 100644 (file)
@@ -2318,7 +2318,6 @@ EXPORT_SYMBOL(ptlrpc_req_xid);
 int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async)
 {
         int                rc;
-        cfs_waitq_t       *wq;
         struct l_wait_info lwi;
 
         /*
@@ -2363,12 +2362,13 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async)
          * a chance to run reply_in_callback(), and to make sure we've
          * unlinked before returning a req to the pool.
          */
-        if (request->rq_set != NULL)
-                wq = &request->rq_set->set_waitq;
-        else
-                wq = &request->rq_reply_waitq;
-
         for (;;) {
+#ifdef __KERNEL__
+               /* The wq argument is ignored by user-space wait_event macros */
+               cfs_waitq_t *wq = (request->rq_set != NULL) ?
+                                 &request->rq_set->set_waitq :
+                                 &request->rq_reply_waitq;
+#endif
                 /* Network access will complete in finite time but the HUGE
                  * timeout lets us CWARN for visibility of sluggish NALs */
                 lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(LONG_UNLINK),