diff options
author | Li Nan <linan122@huawei.com> | 2024-02-26 06:14:44 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-02-26 21:22:22 +0300 |
commit | e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e (patch) | |
tree | 3f9d7e4d1c68967138f41e08213cbabf92eac93a /tools/perf/scripts/python/gecko.py | |
parent | 650b2e69ff6ab4de8d895e933f2b6fbacb1f8411 (diff) | |
download | linux-e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e.tar.xz |
md: check mddev->pers before calling md_set_readonly()
If 'mddev->pers' is NULL, there is nothing to do in md_set_readonly().
Except for md_ioctl(), the other two callers of md_set_readonly() have
already checked 'mddev->pers'. To simplify the code, move the check of
'mddev->pers' to the caller.
Signed-off-by: Li Nan <linan122@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240226031444.3606764-10-linan666@huaweicloud.com
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions