new sparse warnings

From: Steve French
Date: Wed Jul 23 2008 - 20:22:57 EST

Any idea what the new sparse "context imbalance" warnings are? Is
this a bug in sparse?

stevef@smf-t60p:~/kernels/cifs-2.6-devel> make modules C=1
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/
CHECK fs/cifs/cifssmb.c
fs/cifs/cifssmb.c:134:2: warning: context imbalance in
'mark_open_files_invalid': wrong count at exit
fs/cifs/cifssmb.c:134:2: context 'lock': wanted 0, got 1
fs/cifs/cifssmb.c:5191:9: warning: context imbalance in
'CIFSSMBNotify': wrong count at exit
fs/cifs/cifssmb.c:5191:9: context 'lock': wanted 0, got 1
CC [M] fs/cifs/cifssmb.o

The functions it is complaining about don't seem to have a "context
imbalance" see e.g.the one near line 134 of fs/cifs/cifssmb.c

static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
struct cifsFileInfo *open_file = NULL;
struct list_head *tmp;
struct list_head *tmp1;

/* list all files open on tree connection and mark them invalid */
list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
open_file = list_entry(tmp, struct cifsFileInfo, tlist);
if (open_file)
open_file->invalidHandle = true;


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at