Whamcloud - gitweb
LU-5396: add sparse locking annotations 95/11295/9
authorfrank zago <fzago@cray.com>
Sun, 13 Jul 2014 17:06:02 +0000 (12:06 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 27 Aug 2014 15:59:59 +0000 (15:59 +0000)
commit8553494bca7381262843f900d14c58f5c242f3ea
treee1d3e19265f372c4154b54809e641cd48fae26fd
parent92b7657096fbc67ae14ef278d838cb50efe317cc
LU-5396: add sparse locking annotations

Adds __acquires / __releases / __must_hold sparse locking annotations to
several functions.

Fixes sparse warnings such as:

libcfs/libcfs/hash.c:127:1: warning: context imbalance in 'cfs_hash_spin_lock'
    - wrong count at exit
libcfs/libcfs/hash.c:133:1: warning: context imbalance in 'cfs_hash_spin_unlock'
    - unexpected unlock
libcfs/libcfs/hash.c:141:9: warning: context imbalance in 'cfs_hash_rw_lock'
    - wrong count at exit
include/linux/rwlock_api_smp.h:221:9: warning: context imbalance in
    'cfs_hash_rw_unlock' - unexpected unlock

Change-Id: I91834ea62a2bc21ee853a80b0b266e3d0e960bc3
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11295
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
12 files changed:
libcfs/libcfs/hash.c
libcfs/libcfs/libcfs_lock.c
libcfs/libcfs/linux/linux-tracefile.c
lnet/klnds/o2iblnd/o2iblnd_cb.c
lnet/klnds/socklnd/socklnd_cb.c
lnet/lnet/lib-eq.c
lnet/selftest/framework.c
lnet/selftest/rpc.c
lustre/lov/lov_obd.c
lustre/obdclass/cl_object.c
lustre/osc/osc_cache.c
lustre/ptlrpc/client.c