Commit 48cbf265 authored by Jeremiah Mahler's avatar Jeremiah Mahler Committed by Greg Kroah-Hartman

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: default avatarJeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbfeb730
...@@ -698,6 +698,7 @@ srpc_finish_service(struct srpc_service *sv) ...@@ -698,6 +698,7 @@ srpc_finish_service(struct srpc_service *sv)
/* called with sv->sv_lock held */ /* called with sv->sv_lock held */
static void static void
srpc_service_recycle_buffer(struct srpc_service_cd *scd, srpc_buffer_t *buf) 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 (!scd->scd_svc->sv_shuttingdown && scd->scd_buf_adjust >= 0) {
if (srpc_service_post_buffer(scd, buf) != 0) { if (srpc_service_post_buffer(scd, buf) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment