Whamcloud - gitweb
LU-8066 obd_type: discard obd_type_lock 96/35096/9
authorNeilBrown <neilb@suse.com>
Wed, 18 Sep 2019 02:07:56 +0000 (22:07 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:05:15 +0000 (01:05 +0000)
commit6722a95fd0416fa6f24140130ea8a1e0df5f1542
tree025405bc65636c440d74482a0a999aa87c0335f4
parentfafb52290c675e36b09d1de88cdd65ba981cb3a0
LU-8066 obd_type: discard obd_type_lock

This lock is only used to protect typ_refcnt, so change
that to an atomic_t and discard the lock.

The lock also covers calls to try_module_get and module_put,
but this serves no purpose as it does not prevent the module
from being unloaded.

Finally, the return value for the call to try_module_get is
ignored, which is not safe.

Linux-commit: 493ae16ed39a1c9f792c3b650e2dff11ca2e73e8

Change-Id: I904c51cc4d3426ca520c0bcad9665380ce1f3c3d
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/35096
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd.h
lustre/mgc/mgc_request.c
lustre/obdclass/cl_object.c
lustre/obdclass/genops.c
lustre/obdclass/obd_mount_server.c