Commit 67b4c889 authored by Steve French's avatar Steve French

[CIFS] Minor cleanup of xattr query function

Some minor cleanup of cifs query xattr functions (will also make
SMB3 xattr implementation cleaner as well).
Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
parent 4328fea7
...@@ -418,7 +418,7 @@ struct smb_version_operations { ...@@ -418,7 +418,7 @@ struct smb_version_operations {
int (*validate_negotiate)(const unsigned int, struct cifs_tcon *); int (*validate_negotiate)(const unsigned int, struct cifs_tcon *);
ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *, ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *,
const unsigned char *, const unsigned char *, char *, const unsigned char *, const unsigned char *, char *,
size_t, const struct nls_table *, int); size_t, struct cifs_sb_info *);
int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *, int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *,
const char *, const void *, const __u16, const char *, const void *, const __u16,
const struct nls_table *, int); const struct nls_table *, int);
......
...@@ -480,8 +480,7 @@ extern int CIFSSMBCopy(unsigned int xid, ...@@ -480,8 +480,7 @@ extern int CIFSSMBCopy(unsigned int xid,
extern ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon, extern ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
const unsigned char *ea_name, char *EAData, const unsigned char *ea_name, char *EAData,
size_t bufsize, const struct nls_table *nls_codepage, size_t bufsize, struct cifs_sb_info *cifs_sb);
int remap_special_chars);
extern int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon, extern int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon,
const char *fileName, const char *ea_name, const char *fileName, const char *ea_name,
const void *ea_value, const __u16 ea_value_len, const void *ea_value, const __u16 ea_value_len,
......
...@@ -6069,11 +6069,13 @@ ssize_t ...@@ -6069,11 +6069,13 @@ ssize_t
CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon, CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *ea_name, const unsigned char *searchName, const unsigned char *ea_name,
char *EAData, size_t buf_size, char *EAData, size_t buf_size,
const struct nls_table *nls_codepage, int remap) struct cifs_sb_info *cifs_sb)
{ {
/* BB assumes one setup word */ /* BB assumes one setup word */
TRANSACTION2_QPI_REQ *pSMB = NULL; TRANSACTION2_QPI_REQ *pSMB = NULL;
TRANSACTION2_QPI_RSP *pSMBr = NULL; TRANSACTION2_QPI_RSP *pSMBr = NULL;
int remap = cifs_remap(cifs_sb);
struct nls_table *nls_codepage = cifs_sb->local_nls;
int rc = 0; int rc = 0;
int bytes_returned; int bytes_returned;
int list_len; int list_len;
......
...@@ -563,8 +563,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path, ...@@ -563,8 +563,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path, rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path,
"SETFILEBITS", ea_value, 4 /* size of buf */, "SETFILEBITS", ea_value, 4 /* size of buf */,
cifs_sb->local_nls, cifs_sb);
cifs_remap(cifs_sb));
cifs_put_tlink(tlink); cifs_put_tlink(tlink);
if (rc < 0) if (rc < 0)
return (int)rc; return (int)rc;
......
...@@ -235,8 +235,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler, ...@@ -235,8 +235,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
if (pTcon->ses->server->ops->query_all_EAs) if (pTcon->ses->server->ops->query_all_EAs)
rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
full_path, name, value, size, full_path, name, value, size, cifs_sb);
cifs_sb->local_nls, cifs_remap(cifs_sb));
break; break;
case XATTR_CIFS_ACL: { case XATTR_CIFS_ACL: {
...@@ -336,8 +335,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size) ...@@ -336,8 +335,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
if (pTcon->ses->server->ops->query_all_EAs) if (pTcon->ses->server->ops->query_all_EAs)
rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
full_path, NULL, data, buf_size, full_path, NULL, data, buf_size, cifs_sb);
cifs_sb->local_nls, cifs_remap(cifs_sb));
list_ea_exit: list_ea_exit:
kfree(full_path); kfree(full_path);
free_xid(xid); free_xid(xid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment