summaryrefslogtreecommitdiff
path: root/block/blk-exec.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2015-11-24 17:30:34 -0600
committerJens Axboe <axboe@fb.com>2015-11-25 20:49:24 -0700
commit77032ca66f86fa631b38b2e7feeb2b953e59f2f0 (patch)
treec8100aec8d36bd1c5fcbb62d20ece162ef2fe22d /block/blk-exec.c
parent78c4a49a69e910a162b05e4e8727b9bdbf948f13 (diff)
Return EBUSY from BLKRRPART for mounted whole-dev fs
Today, blockdev --rereadpt /dev/sda will fail with EBUSY if any partition of sda is mounted (and will fail with EINVAL if pointed at a partition). But it will pass if the entire block device is formatted with a filesystem and mounted. I don't think this makes sense; partitioning should surely not ever change out from under a mounted device. So check for bdev->bd_super, and fail that with -EBUSY as well. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-exec.c')
0 files changed, 0 insertions, 0 deletions