diff options
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 22557716f9af..487221eeddb7 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -190,8 +190,9 @@ static void fill_in_inode(struct inode *tmp_inode, | |||
190 | tmp_inode->i_data.a_ops = &cifs_addr_ops; | 190 | tmp_inode->i_data.a_ops = &cifs_addr_ops; |
191 | 191 | ||
192 | if(isNewInode) | 192 | if(isNewInode) |
193 | return; /* No sense invalidating pages for new inode since we | 193 | return; /* No sense invalidating pages for new inode |
194 | have not started caching readahead file data yet */ | 194 | since have not started caching readahead file |
195 | data yet */ | ||
195 | 196 | ||
196 | if (timespec_equal(&tmp_inode->i_mtime, &local_mtime) && | 197 | if (timespec_equal(&tmp_inode->i_mtime, &local_mtime) && |
197 | (local_size == tmp_inode->i_size)) { | 198 | (local_size == tmp_inode->i_size)) { |
@@ -536,7 +537,8 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
536 | while((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && | 537 | while((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && |
537 | (rc == 0) && (cifsFile->srch_inf.endOfSearch == FALSE)){ | 538 | (rc == 0) && (cifsFile->srch_inf.endOfSearch == FALSE)){ |
538 | cFYI(1,("calling findnext2")); | 539 | cFYI(1,("calling findnext2")); |
539 | rc = CIFSFindNext(xid,pTcon,cifsFile->netfid, &cifsFile->srch_inf); | 540 | rc = CIFSFindNext(xid,pTcon,cifsFile->netfid, |
541 | &cifsFile->srch_inf); | ||
540 | if(rc) | 542 | if(rc) |
541 | return -ENOENT; | 543 | return -ENOENT; |
542 | } | 544 | } |
@@ -555,7 +557,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
555 | cFYI(1,("found entry - pos_in_buf %d",pos_in_buf)); | 557 | cFYI(1,("found entry - pos_in_buf %d",pos_in_buf)); |
556 | current_entry = cifsFile->srch_inf.srch_entries_start; | 558 | current_entry = cifsFile->srch_inf.srch_entries_start; |
557 | for(i=0;(i<(pos_in_buf)) && (current_entry != NULL);i++) { | 559 | for(i=0;(i<(pos_in_buf)) && (current_entry != NULL);i++) { |
558 | /* go entry to next entry figuring out which we need to start with */ | 560 | /* go entry by entry figuring out which is first */ |
559 | /* if( . or ..) | 561 | /* if( . or ..) |
560 | skip */ | 562 | skip */ |
561 | rc = cifs_entry_is_dot(current_entry,cifsFile); | 563 | rc = cifs_entry_is_dot(current_entry,cifsFile); |
@@ -721,7 +723,8 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
721 | (FILE_DIRECTORY_INFO *)pfindEntry,&obj_type, rc); | 723 | (FILE_DIRECTORY_INFO *)pfindEntry,&obj_type, rc); |
722 | } | 724 | } |
723 | 725 | ||
724 | rc = filldir(direntry,qstring.name,qstring.len,file->f_pos,tmp_inode->i_ino,obj_type); | 726 | rc = filldir(direntry,qstring.name,qstring.len,file->f_pos, |
727 | tmp_inode->i_ino,obj_type); | ||
725 | if(rc) { | 728 | if(rc) { |
726 | cFYI(1,("filldir rc = %d",rc)); | 729 | cFYI(1,("filldir rc = %d",rc)); |
727 | } | 730 | } |
@@ -906,7 +909,8 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
906 | cifs_save_resume_key(current_entry,cifsFile); | 909 | cifs_save_resume_key(current_entry,cifsFile); |
907 | break; | 910 | break; |
908 | } else | 911 | } else |
909 | current_entry = nxt_dir_entry(current_entry,end_of_smb); | 912 | current_entry = nxt_dir_entry(current_entry, |
913 | end_of_smb); | ||
910 | } | 914 | } |
911 | kfree(tmp_buf); | 915 | kfree(tmp_buf); |
912 | break; | 916 | break; |