[PATCH] nvme: Allocate memory for xa_store in advance in nvme_get_effects_log
Christoph Hellwig
hch at lst.de
Wed Dec 11 22:27:49 PST 2024
On Mon, Dec 02, 2024 at 01:42:40PM +0100, Keisuke Nishimura wrote:
> + ret = xa_reserve(&ctrl->cels, csi, GFP_KERNEL);
> + if (ret) {
> + kfree(cel);
> + return ret;
> + }
> +
> ret = nvme_get_log(ctrl, 0x00, NVME_LOG_CMD_EFFECTS, 0, csi,
> cel, sizeof(*cel), 0);
There isn't really any point in doing a xa_reserve here vs simply
handling the xa_store error a bit below.
More information about the Linux-nvme
mailing list