OpenCloudOS-Kernel/drivers/nvme/target
Logan Gunthorpe cfc1a1af56 nvmet-file: fix nvmet_file_flush() always returning an error
Presently, nvmet_file_flush() always returns a call to
errno_to_nvme_status() but that helper doesn't take into account the
case when errno=0. So nvmet_file_flush() always returns an error code.

All other callers of errno_to_nvme_status() check for success before
calling it.

To fix this, ensure errno_to_nvme_status() returns success if the
errno is zero. This should prevent future mistakes like this from
happening.

Fixes: c6aa3542e0 ("nvmet: add error log support for file backend")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
2019-07-31 17:57:21 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00
admin-cmd.c nvmet: export I/O characteristics attributes in Identify 2019-07-09 14:15:37 -07:00
configfs.c nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
core.c nvmet-file: fix nvmet_file_flush() always returning an error 2019-07-31 17:57:21 -07:00
discovery.c nvmet: add transport discovery change op 2019-06-21 11:08:37 +02:00
fabrics-cmd.c nvme: introduce nvme_is_fabrics to check fabrics cmd 2019-06-21 11:08:38 +02:00
fc.c nvme: introduce nvme_is_fabrics to check fabrics cmd 2019-06-21 11:08:38 +02:00
fcloop.c nvme-fcloop: resolve warnings on RCU usage and sleep warnings 2019-07-09 13:16:09 -07:00
io-cmd-bdev.c nvmet: export I/O characteristics attributes in Identify 2019-07-09 14:15:37 -07:00
io-cmd-file.c nvmet-file: clamp-down file namespace lba_shift 2019-04-25 16:51:19 +02:00
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-07-31 17:57:17 -07:00
nvmet.h nvmet: Fix use-after-free bug when a port is removed 2019-07-31 17:57:06 -07:00
rdma.c nvmet: rename nvme_completion instances from rsp to cqe 2019-04-25 16:41:26 +02:00
tcp.c nvmet-tcp: don't fail maxr2t greater than 1 2019-04-25 16:51:19 +02:00
trace.c nvme-trace: fix spelling mistake "spcecific" -> "specific" 2019-07-09 13:44:45 -07:00
trace.h nvmet: introduce target-side trace 2019-06-21 11:15:46 +02:00