diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-18 18:30:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-18 18:30:09 -0400 |
commit | 6b95cf9b8bb3cb647d9f43109a9c50a234b39781 (patch) | |
tree | c7e85a5d8cabe31eb6048d6a4c5cefc29edb120f /drivers | |
parent | fb8527e5c13ed70057b8dfce0764ec625ec3e400 (diff) | |
parent | 25e6be21230d3208d687dad90b6e43419013c351 (diff) | |
download | linux-6b95cf9b8bb3cb647d9f43109a9c50a234b39781.tar.bz2 |
Merge tag 'ceph-for-5.4-rc4' of git://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov:
"A future-proofing decoding fix from Jeff intended for stable and a
patch for a mostly benign race from Dongsheng"
* tag 'ceph-for-5.4-rc4' of git://github.com/ceph/ceph-client:
rbd: cancel lock_dwork if the wait is interrupted
ceph: just skip unrecognized info in ceph_reply_info_extra
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/rbd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 7c4350c0fb77..39136675dae5 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -6639,10 +6639,13 @@ static int rbd_add_acquire_lock(struct rbd_device *rbd_dev) queue_delayed_work(rbd_dev->task_wq, &rbd_dev->lock_dwork, 0); ret = wait_for_completion_killable_timeout(&rbd_dev->acquire_wait, ceph_timeout_jiffies(rbd_dev->opts->lock_timeout)); - if (ret > 0) + if (ret > 0) { ret = rbd_dev->acquire_err; - else if (!ret) - ret = -ETIMEDOUT; + } else { + cancel_delayed_work_sync(&rbd_dev->lock_dwork); + if (!ret) + ret = -ETIMEDOUT; + } if (ret) { rbd_warn(rbd_dev, "failed to acquire exclusive lock: %ld", ret); |