]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[CIFS] Minor cleanup of xattr query function
authorSteve French <smfrench@gmail.com>
Sat, 13 May 2017 01:59:10 +0000 (20:59 -0500)
committerSteve French <smfrench@gmail.com>
Sat, 13 May 2017 01:59:10 +0000 (20:59 -0500)
Some minor cleanup of cifs query xattr functions (will also make
SMB3 xattr implementation cleaner as well).

Signed-off-by: Steve French <steve.french@primarydata.com>
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/inode.c
fs/cifs/xattr.c

index 8be55be70faf6c278de7b7c623501385bf21acaf..bcc7d9acad64b3a59b9c966956accb2c51d9ac13 100644 (file)
@@ -418,7 +418,7 @@ struct smb_version_operations {
        int (*validate_negotiate)(const unsigned int, struct cifs_tcon *);
        ssize_t (*query_all_EAs)(const unsigned int, struct cifs_tcon *,
                        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 *,
                        const char *, const void *, const __u16,
                        const struct nls_table *, int);
index e49958c3f8bbded4265b71e47a87d736a34676da..6eb3147132e30c2225b610b01281111bb896c617 100644 (file)
@@ -480,8 +480,7 @@ extern int CIFSSMBCopy(unsigned int xid,
 extern ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
                        const unsigned char *searchName,
                        const unsigned char *ea_name, char *EAData,
-                       size_t bufsize, const struct nls_table *nls_codepage,
-                       int remap_special_chars);
+                       size_t bufsize, struct cifs_sb_info *cifs_sb);
 extern int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon,
                const char *fileName, const char *ea_name,
                const void *ea_value, const __u16 ea_value_len,
index 4de3186d8a71b31772dfd586fa1fcfe31b23dded..fbb0d4cbda413e5349ab97c8fdfe65435efdc6ed 100644 (file)
@@ -6069,11 +6069,13 @@ ssize_t
 CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon,
                const unsigned char *searchName, const unsigned char *ea_name,
                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 */
        TRANSACTION2_QPI_REQ *pSMB = 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 bytes_returned;
        int list_len;
index c3b2fa0b2ec8a6ceed83a74b65bd60cc1e1a7cee..4d1fcd76d022f6848c16294411d5a937e053e27a 100644 (file)
@@ -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,
                        "SETFILEBITS", ea_value, 4 /* size of buf */,
-                       cifs_sb->local_nls,
-                       cifs_remap(cifs_sb));
+                       cifs_sb);
        cifs_put_tlink(tlink);
        if (rc < 0)
                return (int)rc;
index 20af5187ba63cc14150185952a3f7cdf9526556d..3cb5c9e2d4e78f641549818fbbad7681b193854d 100644 (file)
@@ -235,8 +235,7 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
 
                if (pTcon->ses->server->ops->query_all_EAs)
                        rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
-                               full_path, name, value, size,
-                               cifs_sb->local_nls, cifs_remap(cifs_sb));
+                               full_path, name, value, size, cifs_sb);
                break;
 
        case XATTR_CIFS_ACL: {
@@ -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)
                rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon,
-                               full_path, NULL, data, buf_size,
-                               cifs_sb->local_nls, cifs_remap(cifs_sb));
+                               full_path, NULL, data, buf_size, cifs_sb);
 list_ea_exit:
        kfree(full_path);
        free_xid(xid);