[linux-cifs-client] [PATCH 7/7] [CIFS] convert CIFSPOSIXDelFile and
CIFSSMBDelFile to take cifs_sb arg
Jeff Layton
jlayton at redhat.com
Fri Jul 25 15:23:21 GMT 2008
...and convert them to use the new string conversion wrapper.
Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
fs/cifs/cifsproto.h | 6 ++----
fs/cifs/cifssmb.c | 12 ++++++------
fs/cifs/inode.c | 11 +++--------
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index a729d08..a95a380 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -218,12 +218,10 @@ extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
int remap_special_chars);
extern int CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon,
const char *name, __u16 type,
- const struct nls_table *nls_codepage,
- int remap_special_chars);
+ const struct cifs_sb_info *cifs_sb);
extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
const char *name,
- const struct nls_table *nls_codepage,
- int remap_special_chars);
+ const struct cifs_sb_info *cifs_sb);
extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
const char *fromName, const char *toName,
const struct nls_table *nls_codepage,
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 6c84029..c91feb9 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -876,7 +876,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
int
CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName,
- __u16 type, const struct nls_table *nls_codepage, int remap)
+ __u16 type, const struct cifs_sb_info *cifs_sb)
{
TRANSACTION2_SPI_REQ *pSMB = NULL;
TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -893,8 +893,8 @@ PsxDelete:
if (rc)
return rc;
- name_len = __setup_ucs_nls_name(pSMB->hdr.Flags2, pSMB->FileName,
- fileName, nls_codepage, remap);
+ name_len = setup_ucs_nls_name(pSMB->hdr.Flags2, pSMB->FileName,
+ fileName, cifs_sb);
params = 6 + name_len;
pSMB->MaxParameterCount = cpu_to_le16(2);
@@ -942,7 +942,7 @@ PsxDelete:
int
CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName,
- const struct nls_table *nls_codepage, int remap)
+ const struct cifs_sb_info *cifs_sb)
{
DELETE_FILE_REQ *pSMB = NULL;
DELETE_FILE_RSP *pSMBr = NULL;
@@ -956,8 +956,8 @@ DelFileRetry:
if (rc)
return rc;
- name_len = __setup_ucs_nls_name(pSMB->hdr.Flags2, pSMB->fileName,
- fileName, nls_codepage, remap);
+ name_len = setup_ucs_nls_name(pSMB->hdr.Flags2, pSMB->fileName,
+ fileName, cifs_sb);
pSMB->SearchAttributes =
cpu_to_le16(ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM);
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index cb35a48..3ef180c 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -697,15 +697,13 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
le64_to_cpu(pTcon->fsUnixInfo.Capability))) {
rc = CIFSPOSIXDelFile(xid, pTcon, full_path,
- SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb->local_nls,
- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+ SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb);
cFYI(1, ("posix del rc %d", rc));
if ((rc == 0) || (rc == -ENOENT))
goto psx_del_no_retry;
}
- rc = CIFSSMBDelFile(xid, pTcon, full_path, cifs_sb->local_nls,
- cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+ rc = CIFSSMBDelFile(xid, pTcon, full_path, cifs_sb);
psx_del_no_retry:
if (!rc) {
if (direntry->d_inode)
@@ -777,10 +775,7 @@ psx_del_no_retry:
kfree(pinfo_buf);
}
if (rc == 0) {
- rc = CIFSSMBDelFile(xid, pTcon, full_path,
- cifs_sb->local_nls,
- cifs_sb->mnt_cifs_flags &
- CIFS_MOUNT_MAP_SPECIAL_CHR);
+ rc = CIFSSMBDelFile(xid, pTcon, full_path, cifs_sb);
if (!rc) {
if (direntry->d_inode)
drop_nlink(direntry->d_inode);
More information about the linux-cifs-client
mailing list