mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
nvme: don't hard code size of struct t10_pi_tuple
Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
39bdc5901f
commit
8fa611213d
1 changed files with 2 additions and 1 deletions
|
@ -356,7 +356,8 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns,
|
|||
* unless this namespace is formated such that the metadata can be
|
||||
* stripped/generated by the controller with PRACT=1.
|
||||
*/
|
||||
if (ns && ns->ms && (!ns->pi_type || ns->ms != 8) &&
|
||||
if (ns && ns->ms &&
|
||||
(!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) &&
|
||||
!blk_integrity_rq(req) && !blk_rq_is_passthrough(req))
|
||||
return BLK_STS_NOTSUPP;
|
||||
|
||||
|
|
Loading…
Reference in a new issue