summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMasato Suzuki <masato.suzuki@wdc.com>2017-02-27 20:52:49 +0900
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-08 22:02:53 -0800
commit5086fe4c101b9c5a7cca87754fc6b4a17101f9ff (patch)
tree02bca5890431f9131ed379b95267f826f4e37bd7 /include/uapi/linux
parente323e9ef9f41168ae00ba25c6560aabf9e706b1f (diff)
f2fs: Fix zoned block device support
The introduction of the multi-device feature partially broke the support for zoned block devices. In the function f2fs_scan_devices, sbi->devs allocation and initialization is skipped in the case of a single device mount. This result in no device information structure being allocated for the device. This is fine if the device is a regular device, but in the case of a zoned block device, the device zone type array is not initialized, which causes the function __f2fs_issue_discard_zone to fail as get_blkz_type is unable to determine the zone type of a section. Fix this by always allocating and initializing the sbi->devs device information array even in the case of a single device if that device is zoned. For this particular case, make sure to obtain a reference on the single device so that the call to blkdev_put() in destroy_device_list operates as expected. Fixes: 3c62be17d4f562f4 ("f2fs: support multiple devices") Cc: <stable@vger.kernel.org> # v4.10 Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions