lkml.org 
[lkml]   [2014]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] staging: lustre: selftest: fix _post_buffer context imbalance
Date
Fix the sparse warning about a context imbalance in the
srpc_service_post_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:508:17: warning: context imbalance in 'srpc_service_post_buffer' - unexpected unlock

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
---
drivers/staging/lustre/lnet/selftest/rpc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c
index bb6aa2e..2e9094b 100644
--- a/drivers/staging/lustre/lnet/selftest/rpc.c
+++ b/drivers/staging/lustre/lnet/selftest/rpc.c
@@ -468,6 +468,7 @@ srpc_post_passive_rqtbuf(int service, int local, void *buf, int len,

static int
srpc_service_post_buffer(struct srpc_service_cd *scd, struct srpc_buffer *buf)
+ __must_hold(&scd->scd_lock)
{
struct srpc_service *sv = scd->scd_svc;
struct srpc_msg *msg = &buf->buf_msg;
--
2.1.4


\
 
 \ /
  Last update: 2014-12-27 22:21    [W:0.044 / U:2.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site