summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-05-27 15:34:43 +0200
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 19:55:07 +0200
commit1208ef1f76540b621f80e6130c4fb7bed8ece360 (patch)
tree65edaf646b06ba93ffe2a0ee4a98e7b9378bb59f /fs/cifs/cifssmb.c
parentCIFS: Add SMB2 support for is_path_accessible (diff)
downloadlinux-1208ef1f76540b621f80e6130c4fb7bed8ece360.tar.xz
linux-1208ef1f76540b621f80e6130c4fb7bed8ece360.zip
CIFS: Move query inode info code to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 84a53380e124..fe30bb5dd2d8 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -4559,8 +4559,7 @@ CIFSFindClose(const unsigned int xid, struct cifs_tcon *tcon,
int
CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon,
- const unsigned char *searchName,
- __u64 *inode_number,
+ const char *search_name, __u64 *inode_number,
const struct nls_table *nls_codepage, int remap)
{
int rc = 0;
@@ -4569,7 +4568,7 @@ CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon,
int name_len, bytes_returned;
__u16 params, byte_count;
- cFYI(1, "In GetSrvInodeNum for %s", searchName);
+ cFYI(1, "In GetSrvInodeNum for %s", search_name);
if (tcon == NULL)
return -ENODEV;
@@ -4582,14 +4581,14 @@ GetInodeNumberRetry:
if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
name_len =
cifsConvertToUTF16((__le16 *) pSMB->FileName,
- searchName, PATH_MAX, nls_codepage,
+ search_name, PATH_MAX, nls_codepage,
remap);
name_len++; /* trailing null */
name_len *= 2;
} else { /* BB improve the check for buffer overruns BB */
- name_len = strnlen(searchName, PATH_MAX);
+ name_len = strnlen(search_name, PATH_MAX);
name_len++; /* trailing null */
- strncpy(pSMB->FileName, searchName, name_len);
+ strncpy(pSMB->FileName, search_name, name_len);
}
params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ;