From: James Simmons Date: Wed, 8 Jul 2020 18:54:19 +0000 (-0400) Subject: LU-6142 libcfs: remove last use of container_of0 X-Git-Tag: 2.13.56~42 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0b76a22f1ffa5b0f2a173b5a5580c035cbb6fef5 LU-6142 libcfs: remove last use of container_of0 Remove the last use of container_of0 in osd_ldiskfs. Looking at the code using container_of is safe to use since the handle shouldn't be NULL or PTR_ERR. Change-Id: Id018543997884825d1c3cee76de3a520fc3b7c18 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/39321 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Neil Brown Reviewed-by: Alex Zhuravlev Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/libcfs/include/libcfs/libcfs.h b/libcfs/include/libcfs/libcfs.h index 5caff08..a172dda 100644 --- a/libcfs/include/libcfs/libcfs.h +++ b/libcfs/include/libcfs/libcfs.h @@ -88,8 +88,6 @@ static inline int notifier_from_ioctl_errno(int err) int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data); -#define container_of0(ptr, type, member) container_of_safe(ptr, type, member) - extern struct workqueue_struct *cfs_rehash_wq; struct lnet_debugfs_symlink_def { diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 6ccd372..ce4834a 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -2961,9 +2961,9 @@ static int osd_transfer_project(struct inode *inode, __u32 projid, raw_inode = ldiskfs_raw_inode(&iloc); if (!LDISKFS_FITS_IN_INODE(raw_inode, ei, i_projid)) { - struct osd_thandle *oh = - container_of0(handle, struct osd_thandle, - ot_super); + struct osd_thandle *oh = container_of(handle, + struct osd_thandle, + ot_super); /** * try to expand inode size automatically. */