Commit 4e265939 authored by Li Nan's avatar Li Nan Committed by Song Liu

md: changed the switch of RAID_VERSION to if

There is only one case of this 'switch'. Change it to 'if'.
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240226031444.3606764-3-linan666@huaweicloud.com
parent 2fe4ffc3
...@@ -7613,12 +7613,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode, ...@@ -7613,12 +7613,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode,
* Commands dealing with the RAID driver but not any * Commands dealing with the RAID driver but not any
* particular array: * particular array:
*/ */
switch (cmd) { if (cmd == RAID_VERSION)
case RAID_VERSION: return get_version(argp);
err = get_version(argp);
goto out;
default:;
}
/* /*
* Commands creating/starting a new array: * Commands creating/starting a new array:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment