diff options
author | Steve French <smfrench@austin.rr.com> | 2005-04-29 01:41:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-29 01:41:06 -0400 |
commit | 737b758c965a9b223ac1243ab38d9e507ac86c64 (patch) | |
tree | 9dcdaf3b573a2a27d0d43c1477a18867b144e5f4 /fs/cifs/readdir.c | |
parent | 6c91d362f1e1ebbd4513adb68fc79d552c11e2c0 (diff) |
[PATCH] cifs: character mapping of special characters (part 3 of 3)
Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 22 |
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++; |