diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-07-18 01:06:12 +0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 19:57:58 +0400 |
commit | 71fc7eedb37585ab2f1bec2e615202908bd4f4b7 (patch) | |
tree | 59fba526f8c01569245af7d8e8bec585c8cfe0a5 /drivers/block/drbd/drbd_main.c | |
parent | 1b7ab15b11716d075b3dca34cf41e8d7aba3cba2 (diff) | |
download | linux-71fc7eedb37585ab2f1bec2e615202908bd4f4b7.tar.xz |
drbd: Turn tl_apply() into tl_abort_disk_io()
There is no need to overly generalize this function; it only makes the code
harder to understand.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index f1d696ab6e83..137935037664 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -484,28 +484,23 @@ void tl_restart(struct drbd_tconn *tconn, enum drbd_req_event what) } /** - * tl_apply() - Applies an event to all requests for a certain mdev in the TL + * tl_abort_disk_io() - Abort disk I/O for all requests for a certain mdev in the TL * @mdev: DRBD device. - * @what: The action/event to perform with all request objects - * - * @what might ony be ABORT_DISK_IO. */ -void tl_apply(struct drbd_conf *mdev, enum drbd_req_event what) +void tl_abort_disk_io(struct drbd_conf *mdev) { struct drbd_tconn *tconn = mdev->tconn; struct drbd_tl_epoch *b; struct list_head *le, *tle; struct drbd_request *req; - D_ASSERT(what == ABORT_DISK_IO); - spin_lock_irq(&tconn->req_lock); b = tconn->oldest_tle; while (b) { list_for_each_safe(le, tle, &b->requests) { req = list_entry(le, struct drbd_request, tl_requests); if (req->w.mdev == mdev) - _req_mod(req, what); + _req_mod(req, ABORT_DISK_IO); } b = b->next; } @@ -513,7 +508,7 @@ void tl_apply(struct drbd_conf *mdev, enum drbd_req_event what) list_for_each_safe(le, tle, &tconn->barrier_acked_requests) { req = list_entry(le, struct drbd_request, tl_requests); if (req->w.mdev == mdev) - _req_mod(req, what); + _req_mod(req, ABORT_DISK_IO); } spin_unlock_irq(&tconn->req_lock); |