staging: lustre: fix sparse warnings related to lock context imbalance
authorLoic Pefferkorn <loic@loicp.eu>
Tue, 20 Jan 2015 19:39:11 +0000 (20:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:15 +0000 (19:59 +0800)
commitf8bd34d21622c4550179aeb28715c2fd35e82451
treeb9b3d2c28ca41afcc7f207e57c4836bbba5283a7
parentf3731cdb23bd0a4c982346a90a466c59b0dee10d
staging: lustre: fix sparse warnings related to lock context imbalance

Applies against next-20150120.

Add __acquires() and __releases() function annotations, to fix sparse warnings related to lock context imbalance.

This patch fixes the following warnings:

drivers/staging/lustre//lustre/libcfs/linux/linux-tracefile.c:153:5: warning: context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit
drivers/staging/lustre//lustre/libcfs/linux/linux-tracefile.c:171:39: warning: context imbalance in 'cfs_trace_unlock_tcd' - unexpected unlock
drivers/staging/lustre//lustre/libcfs/hash.c:128:1: warning: context imbalance in 'cfs_hash_spin_lock' - wrong count at exit
drivers/staging/lustre//lustre/libcfs/hash.c:134:1: warning: context imbalance in 'cfs_hash_spin_unlock' - unexpected unlock
drivers/staging/lustre//lustre/libcfs/hash.c:142:9: warning: context imbalance in 'cfs_hash_rw_lock' - wrong count at exit
include/linux/rwlock_api_smp.h:219:9: warning: context imbalance in 'cfs_hash_rw_unlock' - unexpected unlock
drivers/staging/lustre//lustre/obdclass/cl_object.c:195:6: warning: context imbalance in 'cl_object_attr_lock' - wrong count at exit
drivers/staging/lustre//lustre/obdclass/cl_object.c:204:6: warning: context imbalance in 'cl_object_attr_unlock' - unexpected unlock

Signed-off-by: Loic Pefferkorn <loic@loicp.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/hash.c
drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
drivers/staging/lustre/lustre/obdclass/cl_object.c