staging: lustre: simplify ptlrpc_deactivate_and_unlock_import
authorMaxime Lorrillere <maxime.lorrillere@gmail.com>
Mon, 17 Aug 2015 12:04:49 +0000 (14:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:11 +0000 (18:24 -0700)
commit441fda8461c8c1c781c3604d9ddb32747c61657c
tree449d3c0890f96edd37198f5da113705cc19f6e5c
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
staging: lustre: simplify ptlrpc_deactivate_and_unlock_import

The locking scheme used in ptlrpc_deactivate_and_unlock_import and
ptlrpc_deactivate_import generates the followings sparse errors:
drivers/staging/lustre/lustre/ptlrpc/import.c:209:9: warning: context
imbalance in 'ptlrpc_deactivate_and_unlock_import' - unexpected unlock
drivers/staging/lustre/lustre/ptlrpc/import.c:221:6: warning: context
imbalance in 'ptlrpc_deactivate_import' - wrong count at exit

As ptlrpc_deactivate_and_unlock_import is only used by
ptlrpc_deactivate_import as a helper function, this patch moves its code
into ptlrpc_deactivatre_import to fix the sparse warnings.

Signed-off-by: Maxime Lorrillere <maxime.lorrillere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/import.c