]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: fix lock imbalance
authorJoshua Clayton <stillcompiling@gmail.com>
Sun, 27 Dec 2015 06:47:36 +0000 (22:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 22:22:53 +0000 (14:22 -0800)
commitb8c975134123944ceb88c7624821f8d368ffdc84
treebf5401dc5460cdce5596825f7ada2e10e0d4f5ee
parent5b9d2a0a41d95824c236ce680fbba5c465dcdfd2
staging: lustre: fix lock imbalance

nrs_resource_put_safe() might hold a lock one one struct
while operating on the other.
There are 2 levels of structures.
Use nrs_policy_put(), which has locking baked in.

sparse gives the following warning:
drivers/staging/lustre//lustre/ptlrpc/nrs.c:498:39:
warning: context imbalance in 'nrs_resource_put_safe' -
  different lock contexts for basic block

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/nrs.c