All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ronnie Sahlberg <lsahlber@redhat.com>
To: linux-cifs <linux-cifs@vger.kernel.org>
Cc: Steve French <smfrench@gmail.com>
Subject: [PATCH 07/12] cifs: uncomplicate printing the iocharset parameter
Date: Mon, 14 Dec 2020 16:40:22 +1000	[thread overview]
Message-ID: <20201214064027.2885-7-lsahlber@redhat.com> (raw)
In-Reply-To: <20201214064027.2885-1-lsahlber@redhat.com>

There is no need to load the default nls to check if the iocharset argument
was specified or not since we have it in cifs_sb->ctx

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/cifsfs.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 276b0659c238..229e5cbcaf18 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -462,18 +462,6 @@ cifs_show_cache_flavor(struct seq_file *s, struct cifs_sb_info *cifs_sb)
 		seq_puts(s, "loose");
 }
 
-static void
-cifs_show_nls(struct seq_file *s, struct nls_table *cur)
-{
-	struct nls_table *def;
-
-	/* Display iocharset= option if it's not default charset */
-	def = load_nls_default();
-	if (def != cur)
-		seq_printf(s, ",iocharset=%s", cur->charset);
-	unload_nls(def);
-}
-
 /*
  * cifs_show_options() is for displaying mount options in /proc/mounts.
  * Not all settable options are displayed but most of the important
@@ -537,9 +525,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
 		seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho",
 					   cifs_sb->ctx->file_mode,
 					   cifs_sb->ctx->dir_mode);
-
-	cifs_show_nls(s, cifs_sb->local_nls);
-
+	if (cifs_sb->ctx->iocharset)
+		seq_printf(s, ",iocharset=%s", cifs_sb->ctx->iocharset);
 	if (tcon->seal)
 		seq_puts(s, ",seal");
 	else if (tcon->ses->server->ignore_signature)
-- 
2.13.6


  parent reply	other threads:[~2020-12-14  6:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  6:40 [PATCH 01/12] cifs: move cifs_cleanup_volume_info[_content] to fs_context.c Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 02/12] cifs: move [brw]size from cifs_sb to cifs_sb->ctx Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 03/12] cifs: add initial reconfigure support Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 04/12] cifs: we do not allow changing username/password/unc/... during remount Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 05/12] cifs: simplify handling of cifs_sb/ctx->local_nls Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 06/12] cifs: don't create a temp nls in cifs_setup_ipc Ronnie Sahlberg
2020-12-14  6:40 ` Ronnie Sahlberg [this message]
2020-12-14  6:40 ` [PATCH 08/12] cifs: do not allow changing posix_paths during remount Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 09/12] cifs: remove ctx argument from cifs_setup_cifs_sb Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 10/12] cifs: move update of flags into a separate function Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 11/12] cifs: update mnt_cifs_flags during reconfigure Ronnie Sahlberg
2020-12-14  6:40 ` [PATCH 12/12] cifs: fix uninitialized variable in smb3_fs_context_parse_param Ronnie Sahlberg

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=20201214064027.2885-7-lsahlber@redhat.com \
    --to=lsahlber@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.