Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocfs2: use regular seq_show_option for osb_cluster_stack

While cleaning up seq_show_option_n()'s use of strncpy, it was noticed
that the osb_cluster_stack member is always NUL-terminated, so there is no
need to use the special seq_show_option_n() routine. Replace it with the
standard seq_show_option() routine.

Link: https://lkml.kernel.org/r/20230726215919.never.127-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kees Cook and committed by
Andrew Morton
a53fb69b d70fa34f

+1 -2
+1 -2
fs/ocfs2/super.c
··· 1517 1517 seq_printf(s, ",localflocks,"); 1518 1518 1519 1519 if (osb->osb_cluster_stack[0]) 1520 - seq_show_option_n(s, "cluster_stack", osb->osb_cluster_stack, 1521 - OCFS2_STACK_LABEL_LEN); 1520 + seq_show_option(s, "cluster_stack", osb->osb_cluster_stack); 1522 1521 if (opts & OCFS2_MOUNT_USRQUOTA) 1523 1522 seq_printf(s, ",usrquota"); 1524 1523 if (opts & OCFS2_MOUNT_GRPQUOTA)