nvme: remove nvme_ns_config_oncs
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Mar 2019 17:55:06 +0000 (18:55 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Mar 2019 18:57:34 +0000 (12:57 -0600)
Just opencode the two function calls in the caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tested-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 951e9f31b57c2cde0bfab4abb48d1805bb3641a6..26ae805fc9587f1c04c3fc02fedf36c394c5e008 100644 (file)
@@ -1552,12 +1552,6 @@ static inline void nvme_config_write_zeroes(struct nvme_ns *ns)
        blk_queue_max_write_zeroes_sectors(ns->queue, max_sectors);
 }
 
-static inline void nvme_ns_config_oncs(struct nvme_ns *ns)
-{
-       nvme_config_discard(ns);
-       nvme_config_write_zeroes(ns);
-}
-
 static void nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid,
                struct nvme_id_ns *id, struct nvme_ns_ids *ids)
 {
@@ -1611,7 +1605,9 @@ static void nvme_update_disk_info(struct gendisk *disk,
                capacity = 0;
 
        set_capacity(disk, capacity);
-       nvme_ns_config_oncs(ns);
+
+       nvme_config_discard(ns);
+       nvme_config_write_zeroes(ns);
 
        if (id->nsattr & (1 << 0))
                set_disk_ro(disk, true);