Whamcloud - gitweb
LU-9679 lov: annotate nested locking of obd_dev_mutex 48/39248/2
authorMr NeilBrown <neilb@suse.de>
Thu, 2 Jul 2020 21:43:45 +0000 (07:43 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Jul 2020 19:29:20 +0000 (19:29 +0000)
commit10dae4c3b68ebc2509d7089037eccc9f4460c08f
tree500f54ee051dc820febcd69eb5647ec65008614b
parent0d59f1a2c1e88495d1d697acabb572f67ccc211e
LU-9679 lov: annotate nested locking of obd_dev_mutex

obd_statfs() can call lmv_statfs() with ->obd_dev_mutex helds.
lmv_statfs will then call obd_statfs() on a different device
and ->obd_dev_mutex will be taken again.  This is a *different*
mutex, but lockdep cannot see the difference, so it complains.

We can tell lockdep not to worry in this case using
mutex_lock_interruptible_nested().

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0776407b722dd29ab1321289953b63f76fce7ceb
Reviewed-on: https://review.whamcloud.com/39248
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_class.h
lustre/lmv/lmv_obd.c