summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.org>2026-10-11 23:37:21 -0300
committerPaulo Alcantara <pc@manguebit.org>2026-10-13 00:52:23 -0300
commitcd040ff11dae8f6ba3a97cd0cee583d84d6a9be3 (patch)
tree8df4eb5e4d932c5f17aff4ec41783208b212476b /fs
parent78abbc67787d22328c14ba6f477c7e33ba496127 (diff)
smb: client: drop redundant nls_table arg from CIFSSMBSetPathInfo()
CIFSSMBSetPathInfo() already gets the cifs_sb whose local_nls the caller passes separately as nls_codepage, and that is the same table as tcon->ses->local_nls. Derive it from the session and drop the redundant parameter. Signed-off-by: Paulo Alcantara <pc@manguebit.org> Reviewed-by: David Howells <dhowells@redhat.com> Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Shyam Prasad N <sprasad@microsoft.com> Cc: Tom Talpey <tom@talpey.com> Cc: Bharath SM <bharathsm@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/cifssmb.c10
-rw-r--r--fs/smb/client/smb1ops.c6
-rw-r--r--fs/smb/client/smb1proto.h1
3 files changed, 6 insertions, 11 deletions
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 77c10bb7353e..4ab5f8ad3c58 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -5914,11 +5914,9 @@ CIFSSMBSetFileDisposition(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}
-int
-CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
- const char *fileName, const FILE_BASIC_INFO *data,
- const struct nls_table *nls_codepage,
- struct cifs_sb_info *cifs_sb)
+int CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
+ const char *fileName, const FILE_BASIC_INFO *data,
+ struct cifs_sb_info *cifs_sb)
{
TRANSACTION2_SPI_REQ *pSMB = NULL;
TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -5942,7 +5940,7 @@ SetTimesRetry:
if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
name_len =
cifsConvertToUTF16((__le16 *) pSMB->FileName, fileName,
- PATH_MAX, nls_codepage, remap);
+ PATH_MAX, tcon->ses->local_nls, remap);
name_len++; /* trailing null */
name_len *= 2;
} else {
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index 85548e8a6012..313ef84ec22f 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -867,8 +867,7 @@ cifs_mkdir_setinfo(struct inode *inode, const char *full_path,
cifsInode = CIFS_I(inode);
dosattrs = cifsInode->cifsAttrs|ATTR_READONLY;
info.Attributes = cpu_to_le32(dosattrs);
- rc = CIFSSMBSetPathInfo(xid, tcon, full_path, &info, cifs_sb->local_nls,
- cifs_sb);
+ rc = CIFSSMBSetPathInfo(xid, tcon, full_path, &info, cifs_sb);
if (rc == -EOPNOTSUPP || rc == -EINVAL)
rc = SMBSetInformation(xid, tcon, full_path,
info.Attributes,
@@ -1022,8 +1021,7 @@ smb_set_file_info(struct inode *inode, const char *full_path,
if (open_file)
goto set_via_filehandle;
- rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb->local_nls,
- cifs_sb);
+ rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb);
if (rc == 0) {
cinode->cifsAttrs = le32_to_cpu(buf->Attributes);
goto out;
diff --git a/fs/smb/client/smb1proto.h b/fs/smb/client/smb1proto.h
index bb4efc7c1094..fc9e1191c3cb 100644
--- a/fs/smb/client/smb1proto.h
+++ b/fs/smb/client/smb1proto.h
@@ -195,7 +195,6 @@ int CIFSSMBSetFileDisposition(const unsigned int xid, struct cifs_tcon *tcon,
__u32 pid_of_opener);
int CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
const char *fileName, const FILE_BASIC_INFO *data,
- const struct nls_table *nls_codepage,
struct cifs_sb_info *cifs_sb);
int CIFSSMBUnixSetFileInfo(const unsigned int xid, struct cifs_tcon *tcon,
const struct cifs_unix_set_info_args *args, u16 fid,