diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-11 12:17:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-11 12:17:30 -0800 |
commit | f87092c4337fc064b52bfad1df499a5b82f6d088 (patch) | |
tree | d12c230e022c00505a85a6b0a12d5a154c7f32df /drivers/block | |
parent | 40a31da414c39e3cd8c4137c1ceedf59b7ffd4ce (diff) | |
parent | 85f5a4d666fd9be73856ed16bb36c5af5b406b29 (diff) | |
download | linux-f87092c4337fc064b52bfad1df499a5b82f6d088.tar.gz linux-f87092c4337fc064b52bfad1df499a5b82f6d088.tar.bz2 linux-f87092c4337fc064b52bfad1df499a5b82f6d088.zip |
Merge tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client
Pull ceph updates from Ilya Dryomov:
"A patch to allow setting abort_on_full and a fix for an old "rbd
unmap" edge case, marked for stable"
* tag 'ceph-for-5.0-rc2' of git://github.com/ceph/ceph-client:
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
ceph: use vmf_error() in ceph_filemap_fault()
libceph: allow setting abort_on_full for rbd
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8e5140bbf241..1e92b61d0bd5 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5986,7 +5986,6 @@ static ssize_t do_rbd_remove(struct bus_type *bus, struct list_head *tmp; int dev_id; char opt_buf[6]; - bool already = false; bool force = false; int ret; @@ -6019,13 +6018,13 @@ static ssize_t do_rbd_remove(struct bus_type *bus, spin_lock_irq(&rbd_dev->lock); if (rbd_dev->open_count && !force) ret = -EBUSY; - else - already = test_and_set_bit(RBD_DEV_FLAG_REMOVING, - &rbd_dev->flags); + else if (test_and_set_bit(RBD_DEV_FLAG_REMOVING, + &rbd_dev->flags)) + ret = -EINPROGRESS; spin_unlock_irq(&rbd_dev->lock); } spin_unlock(&rbd_dev_list_lock); - if (ret < 0 || already) + if (ret) return ret; if (force) { |