linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Another sparse warning...
@ 2007-02-12 10:23 Anton Altaparmakov
  2007-02-12 15:50 ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Anton Altaparmakov @ 2007-02-12 10:23 UTC (permalink / raw)
  To: linux-sparse

Hi,

Again, using latest code from git://git.kernel.org/pub/scm/linux/ 
kernel/git/josh/sparse.git

When I run:  make CHECKFLAGS="-D__CHECK_ENDIAN__" C=2 modules

I get this warning:

   CHECK   fs/ntfs/super.c
fs/ntfs/super.c:3003:2: warning: context imbalance in  
'ntfs_fill_super' - unexpected unlock

And ntfs_fill_super does on entry:

unlock_kernel();

And then does "lock_kernel();" on exit.

Which is what causes the warning as the warning goes away if I remove  
it...

The unlock+lock was added by Ingo Molnar IIRC because ntfs_fill_super 
() was causing a huge latency which is bad for RT code...

It is a perfectly legitimate thing to do as the kernel lock is held  
by the VFS but NTFS does not need it as it locks everything  
appropriately internally.

What can I do to tell sparse that this code is ok and there should  
not be a warning?  Is there a "__ignore_context_imbalance" or  
something that I can mark up the {un,}lock_kernel() with or something  
like that?

Thanks a lot in advance!

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-02-13  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-12 10:23 Another sparse warning Anton Altaparmakov
2007-02-12 15:50 ` Linus Torvalds
2007-02-12 15:55   ` Anton Altaparmakov
2007-02-13  2:00   ` Christopher Li
2007-02-13  3:48     ` Linus Torvalds
2007-02-13  4:21       ` Christopher Li
2007-02-13  8:49         ` Josh Triplett
2007-02-13  8:38       ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).