> + if (ctrl->ctratt & NVME_CTRL_ATTR_FDPS) {
> + ns->head = head;
> + ret = nvme_query_fdp_info(ns, info);
> + if (ret < 0)
> + goto out_clear_ns_head;
> + }
The conditional assignment of ns->head here is weird. Just pass it
explicitly to nvme_query_fdp_info so that you don't have this issue.
Otherwise the patch looks good.