aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-06-20 03:21:16 -0400
committerSteve French <smfrench@gmail.com>2012-07-24 11:25:08 -0400
commit6d5786a34d98bffb8ad50d8053d1e53231fe0636 (patch)
treeae49860befc52cb18dfb2b86929878a204289601 /fs/cifs/readdir.c
parent2e6e02ab6ddbd539fd7e092973daf057adbd53dc (diff)
CIFS: Rename Get/FreeXid and make them work with unsigned int
Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index a4217f02fab2..da30d96a7495 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -193,7 +193,7 @@ cifs_std_info_to_fattr(struct cifs_fattr *fattr, FIND_FILE_STANDARD_INFO *info,
193 we try to do FindFirst on (NTFS) directory symlinks */ 193 we try to do FindFirst on (NTFS) directory symlinks */
194/* 194/*
195int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb, 195int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb,
196 int xid) 196 unsigned int xid)
197{ 197{
198 __u16 fid; 198 __u16 fid;
199 int len; 199 int len;
@@ -220,7 +220,7 @@ int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb,
220} 220}
221 */ 221 */
222 222
223static int initiate_cifs_search(const int xid, struct file *file) 223static int initiate_cifs_search(const unsigned int xid, struct file *file)
224{ 224{
225 __u16 search_flags; 225 __u16 search_flags;
226 int rc = 0; 226 int rc = 0;
@@ -507,7 +507,7 @@ static int cifs_save_resume_key(const char *current_entry,
507 assume that they are located in the findfirst return buffer.*/ 507 assume that they are located in the findfirst return buffer.*/
508/* We start counting in the buffer with entry 2 and increment for every 508/* We start counting in the buffer with entry 2 and increment for every
509 entry (do not increment for . or .. entry) */ 509 entry (do not increment for . or .. entry) */
510static int find_cifs_entry(const int xid, struct cifs_tcon *pTcon, 510static int find_cifs_entry(const unsigned int xid, struct cifs_tcon *pTcon,
511 struct file *file, char **ppCurrentEntry, int *num_to_ret) 511 struct file *file, char **ppCurrentEntry, int *num_to_ret)
512{ 512{
513 __u16 search_flags; 513 __u16 search_flags;
@@ -721,7 +721,8 @@ static int cifs_filldir(char *find_entry, struct file *file, filldir_t filldir,
721int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) 721int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
722{ 722{
723 int rc = 0; 723 int rc = 0;
724 int xid, i; 724 unsigned int xid;
725 int i;
725 struct cifs_tcon *pTcon; 726 struct cifs_tcon *pTcon;
726 struct cifsFileInfo *cifsFile = NULL; 727 struct cifsFileInfo *cifsFile = NULL;
727 char *current_entry; 728 char *current_entry;
@@ -730,7 +731,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
730 char *end_of_smb; 731 char *end_of_smb;
731 unsigned int max_len; 732 unsigned int max_len;
732 733
733 xid = GetXid(); 734 xid = get_xid();
734 735
735 /* 736 /*
736 * Ensure FindFirst doesn't fail before doing filldir() for '.' and 737 * Ensure FindFirst doesn't fail before doing filldir() for '.' and
@@ -768,7 +769,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
768 769
769 if (file->private_data == NULL) { 770 if (file->private_data == NULL) {
770 rc = -EINVAL; 771 rc = -EINVAL;
771 FreeXid(xid); 772 free_xid(xid);
772 return rc; 773 return rc;
773 } 774 }
774 cifsFile = file->private_data; 775 cifsFile = file->private_data;
@@ -840,6 +841,6 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
840 } /* end switch */ 841 } /* end switch */
841 842
842rddir2_exit: 843rddir2_exit:
843 FreeXid(xid); 844 free_xid(xid);
844 return rc; 845 return rc;
845} 846}