Messages in this thread | | | Date | Wed, 23 Jul 2008 19:22:47 -0500 | From | "Steve French" <> | Subject | new 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
| |