diff options
author | 2024-02-26 11:14:44 +0800 | |
---|---|---|
committer | 2024-02-26 10:22:22 -0800 | |
commit | e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e (patch) | |
tree | 3f9d7e4d1c68967138f41e08213cbabf92eac93a /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | md: clean up openers check in do_md_stop() and md_set_readonly() (diff) | |
download | wireguard-linux-e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e.tar.xz wireguard-linux-e9b0a1556ca2e18d67fa6452b2b99aa66b60ba6e.zip |
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/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions