diff options
author | Romain Izard <romain.izard.pro@gmail.com> | 2018-01-29 13:18:20 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-04-05 00:48:05 +0300 |
commit | 78a8dfbabbece22bee58ac4cb26cab10e7a19c5d (patch) | |
tree | f76960c07b44bc64eab46704c89d10daeed0c920 /fs/ubifs/scan.c | |
parent | 29b7a6fa1ec07e8480b0d9caf635a4498a438bf4 (diff) | |
download | linux-78a8dfbabbece22bee58ac4cb26cab10e7a19c5d.tar.xz |
ubi: Fix error for write access
When opening a device with write access, ubiblock_open returns an error
code. Currently, this error code is -EPERM, but this is not the right
value.
The open function for other block devices returns -EROFS when opening
read-only devices with FMODE_WRITE set. When used with dm-verity, the
veritysetup userspace tool is expecting EROFS, and refuses to use the
ubiblock device.
Use -EROFS for ubiblock as well. As a result, veritysetup accepts the
ubiblock device as valid.
Cc: stable@vger.kernel.org
Fixes: 9d54c8a33eec (UBI: R/O block driver on top of UBI volumes)
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/scan.c')
0 files changed, 0 insertions, 0 deletions