diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2012-03-07 13:41:52 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:17 +0100 |
commit | 38a05c16b8fc855db2294eec36fde2c665b14e8f (patch) | |
tree | 0d02743a0b6e225bade0a3b26d65dd4450b7d2dd /drivers/block/drbd/drbd_req.c | |
parent | drbd: add missing part_round_stats to _drbd_start_io_acct (diff) | |
download | linux-38a05c16b8fc855db2294eec36fde2c665b14e8f.tar.xz linux-38a05c16b8fc855db2294eec36fde2c665b14e8f.zip |
drbd: Consider that bio->bi_bdev might be modified below DRBD
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_req.c')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index bfd14bc9693d..3e4dc070d3ff 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -1154,7 +1154,6 @@ void request_timer_fn(unsigned long data) struct drbd_conf *mdev = (struct drbd_conf *) data; struct drbd_tconn *tconn = mdev->tconn; struct drbd_request *req; /* oldest request */ - struct block_device *bdev; struct list_head *le; struct net_conf *nc; unsigned long ent = 0, dt = 0, et, nt; /* effective timeout = ko_count * timeout */ @@ -1165,7 +1164,6 @@ void request_timer_fn(unsigned long data) if (get_ldev(mdev)) { dt = rcu_dereference(mdev->ldev->disk_conf)->disk_timeout * HZ / 10; - bdev = mdev->ldev->backing_bdev; put_ldev(mdev); } rcu_read_unlock(); @@ -1191,7 +1189,7 @@ void request_timer_fn(unsigned long data) _drbd_set_state(_NS(mdev, conn, C_TIMEOUT), CS_VERBOSE | CS_HARD, NULL); } } - if (dt && req->rq_state & RQ_LOCAL_PENDING && req->private_bio->bi_bdev == bdev) { + if (dt && req->rq_state & RQ_LOCAL_PENDING && req->w.mdev == mdev) { if (time_is_before_eq_jiffies(req->start_time + dt)) { dev_warn(DEV, "Local backing device failed to meet the disk-timeout\n"); __drbd_chk_io_error(mdev, 1); |