nfsd: Use seq_putc() in two functions
diff mbox series

Message ID 20200618015613.17806-1-vulab@iscas.ac.cn
State New
Headers show
Series
  • nfsd: Use seq_putc() in two functions
Related show

Commit Message

Xu Wang June 18, 2020, 1:56 a.m. UTC
A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc()".

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 fs/nfsd/nfs4idmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chuck Lever July 4, 2020, 2:31 p.m. UTC | #1
Hi-

> On Jun 17, 2020, at 9:56 PM, Xu Wang <vulab@iscas.ac.cn> wrote:
> 
> A single character (line break) should be put into a sequence.
> Thus use the corresponding function "seq_putc()".
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>

Applied to nfsd-5.9. Thanks.


> ---
> fs/nfsd/nfs4idmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
> index 9460be8a8321..f92161ce1f97 100644
> --- a/fs/nfsd/nfs4idmap.c
> +++ b/fs/nfsd/nfs4idmap.c
> @@ -168,7 +168,7 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
> 			ent->id);
> 	if (test_bit(CACHE_VALID, &h->flags))
> 		seq_printf(m, " %s", ent->name);
> -	seq_printf(m, "\n");
> +	seq_putc(m, '\n');
> 	return 0;
> }
> 
> @@ -346,7 +346,7 @@ nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
> 			ent->name);
> 	if (test_bit(CACHE_VALID, &h->flags))
> 		seq_printf(m, " %u", ent->id);
> -	seq_printf(m, "\n");
> +	seq_putc(m, '\n');
> 	return 0;
> }
> 
> -- 
> 2.17.1
> 

--
Chuck Lever

Patch
diff mbox series

diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 9460be8a8321..f92161ce1f97 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -168,7 +168,7 @@  idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->id);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %s", ent->name);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
@@ -346,7 +346,7 @@  nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->name);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %u", ent->id);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }