From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Chen Ni <nichen@iscas.ac.cn>,
mark@fasheh.com, jlbec@evilplan.org,
akpm <akpm@linux-foundation.org>
Cc: ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ocfs2: remove unnecessary NULL check before unregister_sysctl_table()
Date: Thu, 24 Apr 2025 08:57:42 +0800 [thread overview]
Message-ID: <65f0265e-bcc4-48a5-9e8b-cc3aab13dde0@linux.alibaba.com> (raw)
In-Reply-To: <20250422073051.1334310-1-nichen@iscas.ac.cn>
On 2025/4/22 15:30, Chen Ni wrote:
> unregister_sysctl_table() checks for NULL pointers internally.
> Remove unneeded NULL check here.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/stackglue.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
> index ddd761cf44c8..a28c127b9934 100644
> --- a/fs/ocfs2/stackglue.c
> +++ b/fs/ocfs2/stackglue.c
> @@ -691,8 +691,7 @@ static void __exit ocfs2_stack_glue_exit(void)
> memset(&locking_max_version, 0,
> sizeof(struct ocfs2_protocol_version));
> ocfs2_sysfs_exit();
> - if (ocfs2_table_header)
> - unregister_sysctl_table(ocfs2_table_header);
> + unregister_sysctl_table(ocfs2_table_header);
> }
>
> MODULE_AUTHOR("Oracle");
prev parent reply other threads:[~2025-04-24 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 7:30 Chen Ni
2025-04-24 0:57 ` Joseph Qi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65f0265e-bcc4-48a5-9e8b-cc3aab13dde0@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=nichen@iscas.ac.cn \
--cc=ocfs2-devel@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®