Whamcloud - gitweb
LU-6142 lustre: convert some container_of0 to container_of
Each of these calls to container_of0() can be determined from local
context to be passed a valid pointer, so it is best to use
container_of() directly to make this clear.
Either:
- the returned pointer is dereferenced with out be tests, or
- the passed-in pointer is dereferened before the call, or
- the passed-in pointer cannot be NULL, such as when
it is a '.next' of a list_head or returned by lu_obecjt_next()
So convert all of these to container_of()
... except one which *should* be container_of(), but cannot
be as it won't compile cleanly on older kernels. Change
that one to container_of_safe() with a big comment.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Idcd954f89ed366882563810ce042a5ddaba5a1e5
Reviewed-on: https://review.whamcloud.com/38383
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 files changed: