aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-05-27 09:34:43 -0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 13:55:07 -0400
commit1208ef1f76540b621f80e6130c4fb7bed8ece360 (patch)
tree65edaf646b06ba93ffe2a0ee4a98e7b9378bb59f /fs/cifs/cifssmb.c
parent2503a0dba989486c59523a947a1dcb50ad90fee9 (diff)
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,
4559 4559
4560int 4560int
4561CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon, 4561CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon,
4562 const unsigned char *searchName, 4562 const char *search_name, __u64 *inode_number,
4563 __u64 *inode_number,
4564 const struct nls_table *nls_codepage, int remap) 4563 const struct nls_table *nls_codepage, int remap)
4565{ 4564{
4566 int rc = 0; 4565 int rc = 0;
@@ -4569,7 +4568,7 @@ CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon,
4569 int name_len, bytes_returned; 4568 int name_len, bytes_returned;
4570 __u16 params, byte_count; 4569 __u16 params, byte_count;
4571 4570
4572 cFYI(1, "In GetSrvInodeNum for %s", searchName); 4571 cFYI(1, "In GetSrvInodeNum for %s", search_name);
4573 if (tcon == NULL) 4572 if (tcon == NULL)
4574 return -ENODEV; 4573 return -ENODEV;
4575 4574
@@ -4582,14 +4581,14 @@ GetInodeNumberRetry:
4582 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { 4581 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
4583 name_len = 4582 name_len =
4584 cifsConvertToUTF16((__le16 *) pSMB->FileName, 4583 cifsConvertToUTF16((__le16 *) pSMB->FileName,
4585 searchName, PATH_MAX, nls_codepage, 4584 search_name, PATH_MAX, nls_codepage,
4586 remap); 4585 remap);
4587 name_len++; /* trailing null */ 4586 name_len++; /* trailing null */
4588 name_len *= 2; 4587 name_len *= 2;
4589 } else { /* BB improve the check for buffer overruns BB */ 4588 } else { /* BB improve the check for buffer overruns BB */
4590 name_len = strnlen(searchName, PATH_MAX); 4589 name_len = strnlen(search_name, PATH_MAX);
4591 name_len++; /* trailing null */ 4590 name_len++; /* trailing null */
4592 strncpy(pSMB->FileName, searchName, name_len); 4591 strncpy(pSMB->FileName, search_name, name_len);
4593 } 4592 }
4594 4593
4595 params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ; 4594 params = 2 /* level */ + 4 /* rsrvd */ + name_len /* incl null */ ;