]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
nilfs2: eliminate sparse warning - "context imbalance"
authorJiro SEKIBA <jir@unicus.jp>
Thu, 14 Oct 2010 04:52:00 +0000 (13:52 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 23 Oct 2010 00:24:40 +0000 (09:24 +0900)
insert sparse annotations to fix following sparse warning.

fs/nilfs2/segment.c:2681:3: warning: context imbalance in 'nilfs_segctor_kill_thread' - unexpected unlock

nilfs_segctor_kill_thread is only called inside sc_state_lock lock.
sparse doesn't detect the context and warn "unexpected unlock".
__acquires/__releases pretend to lock/unlock the sc_state_lock for sparse.

Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/segment.c

index 172ad4257494add4f52de8b1564d10a0e4f94fc9..d926af626177d9ca3fd275cf1be57d8fe105a0d2 100644 (file)
@@ -2674,6 +2674,8 @@ static int nilfs_segctor_start_thread(struct nilfs_sc_info *sci)
 }
 
 static void nilfs_segctor_kill_thread(struct nilfs_sc_info *sci)
+       __acquires(&sci->sc_state_lock)
+       __releases(&sci->sc_state_lock)
 {
        sci->sc_state |= NILFS_SEGCTOR_QUIT;