Whamcloud - gitweb
LU-6142 obdclass: convert calls to container_of0() 81/38381/2
authorMr NeilBrown <neilb@suse.de>
Mon, 27 Apr 2020 05:28:23 +0000 (15:28 +1000)
committerOleg Drokin <green@whamcloud.com>
Wed, 10 Jun 2020 20:51:19 +0000 (20:51 +0000)
commitebc793d7d4407177a7876e03776fc3727c174ff1
treea222e95be2c83edad6c2a676511a654e13bcbeb3
parent3042bcd709ebfea4cf543eb6e8aca330a6cafe9f
LU-6142 obdclass: convert calls to container_of0()

Most calls to container_of8() in lustre/obdclass can be safely changed
to container_of(), etiher because the pointer passed in is obviously
not NULL (or error) from the context, or because the pointer returned
is dereferenced without and checks.

The only excepts are simple wrapped like dt2ls_dev(), lu2ls_obj(),
scrub_obj2dev() where these is no context, so it is safest to convert
to container_of_safe() instead.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ice1063f3ccb74eaec575bff85c960f3288be5ef5
Reviewed-on: https://review.whamcloud.com/38381
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/dt_object.c
lustre/obdclass/local_storage.c
lustre/obdclass/local_storage.h
lustre/obdclass/lu_object.c
lustre/obdclass/scrub.c