diff options
author | Li Nan <linan122@huawei.com> | 2024-02-26 11:14:44 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-02-26 10:22:22 -0800 |
commit | e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e (patch) | |
tree | 3f9d7e4d1c68967138f41e08213cbabf92eac93a /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf | |
parent | 650b2e69ff6ab4de8d895e933f2b6fbacb1f8411 (diff) |
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/Perf-Trace-Util/lib/Perf')
0 files changed, 0 insertions, 0 deletions