* [PATCH] nfsd: Use seq_putc() in seq_quote_mem()
@ 2024-07-13 19:16 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2024-07-13 19:16 UTC (permalink / raw)
To: linux-nfs, kernel-janitors, Chuck Lever, Dai Ngo, Jeff Layton,
Neil Brown, Olga Kornievskaia, Tom Talpey
Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 Jul 2024 21:07:09 +0200
Double quotation characters should be put into a sequence
around other data.
Thus use the function “seq_putc” accordingly.
This issue was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/nfsd/nfs4state.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a20c2c9d7d45..1d15165a15cf 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2636,9 +2636,9 @@ static struct nfs4_client *get_nfsdfs_clp(struct inode *inode)
static void seq_quote_mem(struct seq_file *m, char *data, int len)
{
- seq_puts(m, "\"");
+ seq_putc(m, '"');
seq_escape_mem(m, data, len, ESCAPE_HEX | ESCAPE_NAP | ESCAPE_APPEND, "\"\\");
- seq_puts(m, "\"");
+ seq_putc(m, '"');
}
static const char *cb_state2str(int state)
--
2.45.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-13 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13 19:16 [PATCH] nfsd: Use seq_putc() in seq_quote_mem() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox