Whamcloud - gitweb
LU-6142 lustre: convert use of container_of0 in include/
Most uses of container_of0() are changed to the upstream-standard
interface container_of_safe(). There is no clear context suggesting
that the pointer is known to be value, so it is consistent with the
current code to use the _safe() version.
In a few cases it is clear that the pointer must be valid.
This may be because:
- it is a '.next' for a struct list_head
- it from lo_object_next() whic his a special case of above
- the returned value is confirmed to be valid by an LINVRNT()
So change all container_of0() to either container_of_safe() or
container_of().
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I9fdb8b7216667e58d3837ea555889f9346e4b10a
Reviewed-on: https://review.whamcloud.com/38380
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>