drbd: remove unused argument from drbd_request_prepare and __drbd_make_request
Subsystems (2)
PATCH 1/1 drbd: remove unused argument from drbd_request_prepare and __drbd_make_request
We can remove start_jif since it is not used by drbd_request_prepare, then remove it from __drbd_make_request further.
Signed-off-by Guoqing Jiang <[email protected]>
--- drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 3 +-- drivers/block/drbd/drbd_req.c | 11 ++++------- 3 files changed, 6 insertions(+), 10 deletions(-)
drivers/block/drbd/drbd_int.h +1 -1
@@ -1450,7 +1450,7 @@ extern void conn_free_crypto(struct drbd_connection *connection);/* drbd_req */ extern void do_submit (struct work_struct *ws); -extern void __drbd_make_request (struct drbd_device *,struct bio *,unsigned long ); +extern void __drbd_make_request (struct drbd_device *,struct bio *);extern blk_qc_t drbd_make_request (struct request_queue *q,struct bio *bio);extern int drbd_read_remote (struct drbd_device *device,struct drbd_request *req);extern int is_valid_ar_handle (struct drbd_request *,sector_t );
drivers/block/drbd/drbd_main.c +1 -2
@@ -2292,7 +2292,6 @@ static void do_retry(struct work_struct *ws)list_for_each_entry_safe (req, tmp, &writes, tl_requests) {struct drbd_device *device = req->device;struct bio *bio = req->master_bio; -unsigned long start_jif = req->start_jif;bool expected; expected =
@@ -2327,7 +2326,7 @@ static void do_retry(struct work_struct *ws)/* We are not just doing generic_make_request(), * as we want to keep the start_time information. */ inc_ap_bio (device); -__drbd_make_request (device, bio, start_jif); +__drbd_make_request (device, bio); } }
drivers/block/drbd/drbd_req.c +4 -7
@@ -1188,7 +1188,7 @@ static void drbd_queue_write(struct drbd_device *device, struct drbd_request *re* Returns ERR_PTR(-ENOMEM) if we cannot allocate a drbd_request. */ static struct drbd_request * -drbd_request_prepare (struct drbd_device *device,struct bio *bio,unsigned long start_jif) +drbd_request_prepare (struct drbd_device *device,struct bio *bio) {const int rw =bio_data_dir (bio);struct drbd_request *req;
@@ -1416,9 +1416,9 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_requestcomplete_master_bio (device, &m); } -void __drbd_make_request (struct drbd_device *device,struct bio *bio,unsigned long start_jif) +void __drbd_make_request (struct drbd_device *device,struct bio *bio) { -struct drbd_request *req =drbd_request_prepare (device, bio, start_jif); +struct drbd_request *req =drbd_request_prepare (device, bio);if (IS_ERR_OR_NULL (req))return ;drbd_send_and_submit (device, req);
@@ -1596,19 +1596,16 @@ void do_submit(struct work_struct *ws)blk_qc_t drbd_make_request (struct request_queue *q,struct bio *bio) {struct drbd_device *device = (struct drbd_device *) q->queuedata; -unsigned long start_jif;blk_queue_split (q, &bio); - start_jif = jiffies; -/* * what we "blindly" assume: */ D_ASSERT (device,IS_ALIGNED (bio->bi_iter.bi_size,512 ));inc_ap_bio (device); -__drbd_make_request (device, bio, start_jif); +__drbd_make_request (device, bio);return BLK_QC_T_NONE ; }
Signature · 1 line
2.17.1
PATCH v2 1/1 drbd: remove unused argument from drbd_request_prepare and __drbd_make_request
We can remove start_jif since it is not used by drbd_request_prepare, then remove it from __drbd_make_request further.
Signed-off-by Guoqing Jiang <[email protected]>
---
V2:
1. rebased with latest for-next branch
drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 3 +-- drivers/block/drbd/drbd_req.c | 11 ++++------- 3 files changed, 6 insertions(+), 10 deletions(-)
drivers/block/drbd/drbd_int.h +1 -1
@@ -1450,7 +1450,7 @@ extern void conn_free_crypto(struct drbd_connection *connection);/* drbd_req */ extern void do_submit (struct work_struct *ws); -extern void __drbd_make_request (struct drbd_device *,struct bio *,unsigned long ); +extern void __drbd_make_request (struct drbd_device *,struct bio *);extern blk_qc_t drbd_submit_bio (struct bio *bio);extern int drbd_read_remote (struct drbd_device *device,struct drbd_request *req);extern int is_valid_ar_handle (struct drbd_request *,sector_t );
drivers/block/drbd/drbd_main.c +1 -2
@@ -2293,7 +2293,6 @@ static void do_retry(struct work_struct *ws)list_for_each_entry_safe (req, tmp, &writes, tl_requests) {struct drbd_device *device = req->device;struct bio *bio = req->master_bio; -unsigned long start_jif = req->start_jif;bool expected; expected =
@@ -2328,7 +2327,7 @@ static void do_retry(struct work_struct *ws)/* We are not just doing submit_bio_noacct(), * as we want to keep the start_time information. */ inc_ap_bio (device); -__drbd_make_request (device, bio, start_jif); +__drbd_make_request (device, bio); } }
drivers/block/drbd/drbd_req.c +4 -7
@@ -1188,7 +1188,7 @@ static void drbd_queue_write(struct drbd_device *device, struct drbd_request *re* Returns ERR_PTR(-ENOMEM) if we cannot allocate a drbd_request. */ static struct drbd_request * -drbd_request_prepare (struct drbd_device *device,struct bio *bio,unsigned long start_jif) +drbd_request_prepare (struct drbd_device *device,struct bio *bio) {const int rw =bio_data_dir (bio);struct drbd_request *req;
@@ -1416,9 +1416,9 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_requestcomplete_master_bio (device, &m); } -void __drbd_make_request (struct drbd_device *device,struct bio *bio,unsigned long start_jif) +void __drbd_make_request (struct drbd_device *device,struct bio *bio) { -struct drbd_request *req =drbd_request_prepare (device, bio, start_jif); +struct drbd_request *req =drbd_request_prepare (device, bio);if (IS_ERR_OR_NULL (req))return ;drbd_send_and_submit (device, req);
@@ -1596,19 +1596,16 @@ void do_submit(struct work_struct *ws)blk_qc_t drbd_submit_bio (struct bio *bio) {struct drbd_device *device = bio->bi_disk->private_data; -unsigned long start_jif;blk_queue_split (&bio); - start_jif = jiffies; -/* * what we "blindly" assume: */ D_ASSERT (device,IS_ALIGNED (bio->bi_iter.bi_size,512 ));inc_ap_bio (device); -__drbd_make_request (device, bio, start_jif); +__drbd_make_request (device, bio);return BLK_QC_T_NONE ; }
Signature · 1 line
2.17.1