aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 4a33add24d53..7ca876b6f2ab 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -314,7 +314,7 @@ static int initiate_cifs_search(const int xid, struct file *file)
314 return -EINVAL; 314 return -EINVAL;
315 315
316 down(&file->f_dentry->d_sb->s_vfs_rename_sem); 316 down(&file->f_dentry->d_sb->s_vfs_rename_sem);
317 full_path = build_wildcard_path_from_dentry(file->f_dentry); 317 full_path = build_path_from_dentry(file->f_dentry);
318 up(&file->f_dentry->d_sb->s_vfs_rename_sem); 318 up(&file->f_dentry->d_sb->s_vfs_rename_sem);
319 319
320 if(full_path == NULL) { 320 if(full_path == NULL) {
@@ -333,8 +333,9 @@ ffirst_retry:
333 cifsFile->srch_inf.info_level = SMB_FIND_FILE_DIRECTORY_INFO; 333 cifsFile->srch_inf.info_level = SMB_FIND_FILE_DIRECTORY_INFO;
334 } 334 }
335 335
336 rc = CIFSFindFirst(xid, pTcon,full_path,cifs_sb->local_nls, 336 rc = CIFSFindFirst(xid, pTcon,full_path,cifs_sb->local_nls,
337 &cifsFile->netfid, &cifsFile->srch_inf); 337 &cifsFile->netfid, &cifsFile->srch_inf,
338 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
338 if(rc == 0) 339 if(rc == 0)
339 cifsFile->invalidHandle = FALSE; 340 cifsFile->invalidHandle = FALSE;
340 if((rc == -EOPNOTSUPP) && 341 if((rc == -EOPNOTSUPP) &&
@@ -600,12 +601,10 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst,
600 if(unicode) { 601 if(unicode) {
601 /* BB fixme - test with long names */ 602 /* BB fixme - test with long names */
602 /* Note converted filename can be longer than in unicode */ 603 /* Note converted filename can be longer than in unicode */
603#ifdef CONFIG_CIFS_EXPERIMENTAL
604 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR) 604 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR)
605 pqst->len = cifs_convertUCSpath((char *)pqst->name, 605 pqst->len = cifs_convertUCSpath((char *)pqst->name,
606 (__le16 *)filename, len/2, nlt); 606 (__le16 *)filename, len/2, nlt);
607 else 607 else
608#endif /* CIFS_EXPERIMENTAL */
609 pqst->len = cifs_strfromUCS_le((char *)pqst->name, 608 pqst->len = cifs_strfromUCS_le((char *)pqst->name,
610 (wchar_t *)filename,len/2,nlt); 609 (wchar_t *)filename,len/2,nlt);
611 } else { 610 } else {
@@ -849,19 +848,6 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
849 break; 848 break;
850 } 849 }
851 850
852 /* BB FIXME - need to enable the below code BB */
853
854 /* if((!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) ||
855 (cifsFile->srch_inf.info_level !=
856 something that supports server inodes)) {
857 create dentry
858 create inode
859 fill in inode new_inode (getting local i_ino)
860 }
861 also create local inode for performance reasons (so we
862 have a cache of inode metadata) unless this new mount
863 parm says otherwise */
864
865 rc = cifs_filldir(current_entry, file, 851 rc = cifs_filldir(current_entry, file,
866 filldir, direntry,tmp_buf); 852 filldir, direntry,tmp_buf);
867 file->f_pos++; 853 file->f_pos++;