diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-03-12 17:30:38 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-03-12 17:30:38 +0100 |
commit | db45dc9540ea4864bb9d22eed30d3e70ed5d56d4 (patch) | |
tree | c611d75097036ff464e9af31aa729e34c863ec93 /drivers/nvme/target/io-cmd.c | |
parent | 40088dc4e1ead7df31728c73f5b51d71da18831d (diff) | |
parent | a3e39ed1f40e14f24bec0f91c4fa0408fb6c4d02 (diff) |
Merge tag 'asoc-fix-v4.16-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linussound-4.16-rc6
ASoC: Fixes for v4.16
This is a fairly standard collection of fixes, there's no changes to the
core here just a bunch of small device specific changes for single
drivers plus an update to the MAINTAINERS file for the sgl5000.
Diffstat (limited to 'drivers/nvme/target/io-cmd.c')
-rw-r--r-- | drivers/nvme/target/io-cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/nvme/target/io-cmd.c b/drivers/nvme/target/io-cmd.c index 0a4372a016f2..28bbdff4a88b 100644 --- a/drivers/nvme/target/io-cmd.c +++ b/drivers/nvme/target/io-cmd.c @@ -105,10 +105,13 @@ static void nvmet_execute_flush(struct nvmet_req *req) static u16 nvmet_discard_range(struct nvmet_ns *ns, struct nvme_dsm_range *range, struct bio **bio) { - if (__blkdev_issue_discard(ns->bdev, + int ret; + + ret = __blkdev_issue_discard(ns->bdev, le64_to_cpu(range->slba) << (ns->blksize_shift - 9), le32_to_cpu(range->nlb) << (ns->blksize_shift - 9), - GFP_KERNEL, 0, bio)) + GFP_KERNEL, 0, bio); + if (ret && ret != -EOPNOTSUPP) return NVME_SC_INTERNAL | NVME_SC_DNR; return 0; } |