Re: [PATCH] scsi: target: iscsi: Drop unnecessary container_of

From: Martin K. Petersen
Date: Fri May 14 2021 - 22:42:30 EST



Guenter,

> The structure pointer passed to container_of() is never NULL; that was
> already checked. That means that the result of container_of()
> operations on it is also never NULL, even though se_node_acl is the
> first element of the structure embedding it. On top of that, it is
> misleading to perform a NULL check on the result of container_of()
> because the position of the contained element could change, which
> would make the test invalid. Remove the unnecessary NULL check.

Applied to 5.14/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering