summaryrefslogtreecommitdiff
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-02-26 15:22:32 -0500
committerMike Snitzer <snitzer@redhat.com>2018-03-06 20:23:58 -0500
commit99243b922c9ddb4976b8db2eeffb0aed6e06c6f9 (patch)
treefa38ca0456f3da78068df422b7a300301823d242 /drivers/md/dm-table.c
parentda1e148803e0b98961599b0295418bb7a8fc79f3 (diff)
dm table: fix "nvme" test
The strncmp function should compare 4 bytes. Fixes: 22c11858e8002 ("dm: introduce DM_TYPE_NVME_BIO_BASED") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 5fe7ec356c33..30b3294a8778 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1755,7 +1755,7 @@ static int device_no_partial_completion(struct dm_target *ti, struct dm_dev *dev
char b[BDEVNAME_SIZE];
/* For now, NVMe devices are the only devices of this class */
- return (strncmp(bdevname(dev->bdev, b), "nvme", 3) == 0);
+ return (strncmp(bdevname(dev->bdev, b), "nvme", 4) == 0);
}
static bool dm_table_does_not_support_partial_completion(struct dm_table *t)