diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-10-18 14:38:38 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-25 20:25:00 +0200 |
commit | bb749b31c25e9b11f8f974baac8d507298ffbb70 (patch) | |
tree | 7ac80dc67d5ea61bc42896d5aea13a193ba28f14 /block/blk-lib.c | |
parent | block: Invalidate cache on discard v2 (diff) | |
download | linux-bb749b31c25e9b11f8f974baac8d507298ffbb70.tar.xz linux-bb749b31c25e9b11f8f974baac8d507298ffbb70.zip |
block: move CAP_SYS_ADMIN check in blkdev_roset()
Check for CAP_SYS_ADMIN before calling into the driver, similar to
blkdev_flushbuf(). This is safer and can spare a check in the driver.
(Currently BLKROSET is overridden by md and rbd, rbd is missing the
check. md has the check, but it covers a lot more than BLKROSET.)
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-lib.c')
0 files changed, 0 insertions, 0 deletions