lkml.org 
[lkml]   [2008]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnew sparse warnings
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/checksyscalls.sh
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 */
write_lock(&GlobalSMBSeslock);
list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
open_file = list_entry(tmp, struct cifsFileInfo, tlist);
if (open_file)
open_file->invalidHandle = true;
}
write_unlock(&GlobalSMBSeslock);
}


--
Thanks,

Steve


\
 
 \ /
  Last update: 2008-07-24 02:25    [W:0.035 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site