summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/selftest/rpc.c
diff options
context:
space:
mode:
authorJeremiah Mahler <jmmahler@gmail.com>2014-12-27 12:46:50 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-17 15:52:58 -0800
commit48cbf26505d91385722afc30632952e465d8bb7c (patch)
tree93cb1e91c11e8ab862fd6380654156414811a062 /drivers/staging/lustre/lnet/selftest/rpc.c
parentdbfeb73092e849e258fd7f9aa5b00e4ab2ee6fbc (diff)
downloadlinux-48cbf26505d91385722afc30632952e465d8bb7c.tar.bz2
staging: lustre: selftest: fix _recycle_buffer context imbalance
Fix the sparse warning about a context imbalance in the srpc_service_recycle_buffer function by telling sparse that it should expect the lock to be held on entry and held on exit. drivers/staging/lustre/lnet/selftest/rpc.c:725:20: warning: context imbalance in 'srpc_service_recycle_buffer' - unexpected unlock Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest/rpc.c')
-rw-r--r--drivers/staging/lustre/lnet/selftest/rpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c
index 2e9094bd889f..1f7d9a6248db 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.c
+++ b/drivers/staging/lustre/lnet/selftest/rpc.c
@@ -698,6 +698,7 @@ srpc_finish_service(struct srpc_service *sv)
/* called with sv->sv_lock held */
static void
srpc_service_recycle_buffer(struct srpc_service_cd *scd, srpc_buffer_t *buf)
+ __must_hold(&scd->scd_lock)
{
if (!scd->scd_svc->sv_shuttingdown && scd->scd_buf_adjust >= 0) {
if (srpc_service_post_buffer(scd, buf) != 0) {