diff options
-rw-r--r-- | fs/cifs/readdir.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index e1351fe18a15..5bc9ab7586bc 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -829,7 +829,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
829 | /* inode num, inode type and filename returned */ | 829 | /* inode num, inode type and filename returned */ |
830 | static int cifs_get_name_from_search_buf(struct qstr *pqst, | 830 | static int cifs_get_name_from_search_buf(struct qstr *pqst, |
831 | char *current_entry, __u16 level, unsigned int unicode, | 831 | char *current_entry, __u16 level, unsigned int unicode, |
832 | struct cifs_sb_info *cifs_sb, int max_len, __u64 *pinum) | 832 | struct cifs_sb_info *cifs_sb, unsigned int max_len, __u64 *pinum) |
833 | { | 833 | { |
834 | int rc = 0; | 834 | int rc = 0; |
835 | unsigned int len = 0; | 835 | unsigned int len = 0; |
@@ -890,7 +890,8 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, | |||
890 | if (unicode) { | 890 | if (unicode) { |
891 | pqst->len = cifs_from_ucs2((char *) pqst->name, | 891 | pqst->len = cifs_from_ucs2((char *) pqst->name, |
892 | (__le16 *) filename, | 892 | (__le16 *) filename, |
893 | UNICODE_NAME_MAX, max_len, nlt, | 893 | UNICODE_NAME_MAX, |
894 | min(len, max_len), nlt, | ||
894 | cifs_sb->mnt_cifs_flags & | 895 | cifs_sb->mnt_cifs_flags & |
895 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 896 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
896 | } else { | 897 | } else { |
@@ -902,8 +903,8 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, | |||
902 | return rc; | 903 | return rc; |
903 | } | 904 | } |
904 | 905 | ||
905 | static int cifs_filldir(char *pfindEntry, struct file *file, | 906 | static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, |
906 | filldir_t filldir, void *direntry, char *scratch_buf, int max_len) | 907 | void *direntry, char *scratch_buf, unsigned int max_len) |
907 | { | 908 | { |
908 | int rc = 0; | 909 | int rc = 0; |
909 | struct qstr qstring; | 910 | struct qstr qstring; |
@@ -1000,7 +1001,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
1000 | int num_to_fill = 0; | 1001 | int num_to_fill = 0; |
1001 | char *tmp_buf = NULL; | 1002 | char *tmp_buf = NULL; |
1002 | char *end_of_smb; | 1003 | char *end_of_smb; |
1003 | int max_len; | 1004 | unsigned int max_len; |
1004 | 1005 | ||
1005 | xid = GetXid(); | 1006 | xid = GetXid(); |
1006 | 1007 | ||