|
@@ -23,6 +23,7 @@ static int svc_deferred_recv(struct svc_rqst *rqstp);
|
|
static struct cache_deferred_req *svc_defer(struct cache_req *req);
|
|
static struct cache_deferred_req *svc_defer(struct cache_req *req);
|
|
static void svc_age_temp_xprts(unsigned long closure);
|
|
static void svc_age_temp_xprts(unsigned long closure);
|
|
static void svc_delete_xprt(struct svc_xprt *xprt);
|
|
static void svc_delete_xprt(struct svc_xprt *xprt);
|
|
|
|
+static void svc_xprt_do_enqueue(struct svc_xprt *xprt);
|
|
|
|
|
|
/* apparently the "standard" is that clients close
|
|
/* apparently the "standard" is that clients close
|
|
* idle connections after 5 minutes, servers after
|
|
* idle connections after 5 minutes, servers after
|
|
@@ -222,11 +223,12 @@ static void svc_xprt_received(struct svc_xprt *xprt)
|
|
if (!test_bit(XPT_BUSY, &xprt->xpt_flags))
|
|
if (!test_bit(XPT_BUSY, &xprt->xpt_flags))
|
|
return;
|
|
return;
|
|
/* As soon as we clear busy, the xprt could be closed and
|
|
/* As soon as we clear busy, the xprt could be closed and
|
|
- * 'put', so we need a reference to call svc_xprt_enqueue with:
|
|
|
|
|
|
+ * 'put', so we need a reference to call svc_xprt_do_enqueue with:
|
|
*/
|
|
*/
|
|
svc_xprt_get(xprt);
|
|
svc_xprt_get(xprt);
|
|
|
|
+ smp_mb__before_atomic();
|
|
clear_bit(XPT_BUSY, &xprt->xpt_flags);
|
|
clear_bit(XPT_BUSY, &xprt->xpt_flags);
|
|
- svc_xprt_enqueue(xprt);
|
|
|
|
|
|
+ svc_xprt_do_enqueue(xprt);
|
|
svc_xprt_put(xprt);
|
|
svc_xprt_put(xprt);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -335,12 +337,7 @@ static bool svc_xprt_has_something_to_do(struct svc_xprt *xprt)
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * Queue up a transport with data pending. If there are idle nfsd
|
|
|
|
- * processes, wake 'em up.
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
-void svc_xprt_enqueue(struct svc_xprt *xprt)
|
|
|
|
|
|
+static void svc_xprt_do_enqueue(struct svc_xprt *xprt)
|
|
{
|
|
{
|
|
struct svc_pool *pool;
|
|
struct svc_pool *pool;
|
|
struct svc_rqst *rqstp;
|
|
struct svc_rqst *rqstp;
|
|
@@ -398,6 +395,18 @@ void svc_xprt_enqueue(struct svc_xprt *xprt)
|
|
out_unlock:
|
|
out_unlock:
|
|
spin_unlock_bh(&pool->sp_lock);
|
|
spin_unlock_bh(&pool->sp_lock);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Queue up a transport with data pending. If there are idle nfsd
|
|
|
|
+ * processes, wake 'em up.
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+void svc_xprt_enqueue(struct svc_xprt *xprt)
|
|
|
|
+{
|
|
|
|
+ if (test_bit(XPT_BUSY, &xprt->xpt_flags))
|
|
|
|
+ return;
|
|
|
|
+ svc_xprt_do_enqueue(xprt);
|
|
|
|
+}
|
|
EXPORT_SYMBOL_GPL(svc_xprt_enqueue);
|
|
EXPORT_SYMBOL_GPL(svc_xprt_enqueue);
|
|
|
|
|
|
/*
|
|
/*
|