Skip to content

Commit 67b4c88

Browse files
committed
[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: Steve French <[email protected]>
1 parent 4328fea commit 67b4c88

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

fs/cifs/cifsglob.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ struct smb_version_operations {
418418
int (*validate_negotiate)(const unsigned int, struct cifs_tcon *);
419419
ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *,
420420
const unsigned char *, const unsigned char *, char *,
421-
size_t, const struct nls_table *, int);
421+
size_t, struct cifs_sb_info *);
422422
int (*set_EA)(const unsigned int, struct cifs_tcon *, const char *,
423423
const char *, const void *, const __u16,
424424
const struct nls_table *, int);

fs/cifs/cifsproto.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ extern int CIFSSMBCopy(unsigned int xid,
480480
extern ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
481481
const unsigned char *searchName,
482482
const unsigned char *ea_name, char *EAData,
483-
size_t bufsize, const struct nls_table *nls_codepage,
484-
int remap_special_chars);
483+
size_t bufsize, struct cifs_sb_info *cifs_sb);
485484
extern int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon,
486485
const char *fileName, const char *ea_name,
487486
const void *ea_value, const __u16 ea_value_len,

fs/cifs/cifssmb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6069,11 +6069,13 @@ ssize_t
60696069
CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
60706070
const unsigned char *searchName, const unsigned char *ea_name,
60716071
char *EAData, size_t buf_size,
6072-
const struct nls_table *nls_codepage, int remap)
6072+
struct cifs_sb_info *cifs_sb)
60736073
{
60746074
/* BB assumes one setup word */
60756075
TRANSACTION2_QPI_REQ *pSMB = NULL;
60766076
TRANSACTION2_QPI_RSP *pSMBr = NULL;
6077+
int remap = cifs_remap(cifs_sb);
6078+
struct nls_table *nls_codepage = cifs_sb->local_nls;
60776079
int rc = 0;
60786080
int bytes_returned;
60796081
int list_len;

fs/cifs/inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
563563

564564
rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path,
565565
"SETFILEBITS", ea_value, 4 /* size of buf */,
566-
cifs_sb->local_nls,
567-
cifs_remap(cifs_sb));
566+
cifs_sb);
568567
cifs_put_tlink(tlink);
569568
if (rc < 0)
570569
return (int)rc;

fs/cifs/xattr.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
235235

236236
if (pTcon->ses->server->ops->query_all_EAs)
237237
rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
238-
full_path, name, value, size,
239-
cifs_sb->local_nls, cifs_remap(cifs_sb));
238+
full_path, name, value, size, cifs_sb);
240239
break;
241240

242241
case XATTR_CIFS_ACL: {
@@ -336,8 +335,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
336335

337336
if (pTcon->ses->server->ops->query_all_EAs)
338337
rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
339-
full_path, NULL, data, buf_size,
340-
cifs_sb->local_nls, cifs_remap(cifs_sb));
338+
full_path, NULL, data, buf_size, cifs_sb);
341339
list_ea_exit:
342340
kfree(full_path);
343341
free_xid(xid);

0 commit comments

Comments
 (0)