diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-18 19:20:26 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 22:46:26 -0400 |
commit | 4b4de76e35518fc0c636f628abca8c1b19ad6689 (patch) | |
tree | 18b27673849d55235c216f0cbb811e1aa4b87ae9 /fs/cifs/readdir.c | |
parent | cbe6f439f5762c7fb4d2dd9293f5fdbfc4cd68f8 (diff) |
CIFS: Replace netfid with cifs_fid struct in cifsFileInfo
This is help us to extend the code for future protocols that can use
another fid mechanism (as SMB2 that has it divided into two parts:
persistent and violatile).
Also rename variables and refactor the code around the changes.
Reviewed-by: Jeff Layton <jlayton@samba.org>
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index d87f82678bc7..9e76e3b3289b 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -279,7 +279,7 @@ ffirst_retry: | |||
279 | search_flags |= CIFS_SEARCH_BACKUP_SEARCH; | 279 | search_flags |= CIFS_SEARCH_BACKUP_SEARCH; |
280 | 280 | ||
281 | rc = CIFSFindFirst(xid, tcon, full_path, cifs_sb->local_nls, | 281 | rc = CIFSFindFirst(xid, tcon, full_path, cifs_sb->local_nls, |
282 | &cifsFile->netfid, search_flags, &cifsFile->srch_inf, | 282 | &cifsFile->fid.netfid, search_flags, &cifsFile->srch_inf, |
283 | cifs_sb->mnt_cifs_flags & | 283 | cifs_sb->mnt_cifs_flags & |
284 | CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb)); | 284 | CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb)); |
285 | if (rc == 0) | 285 | if (rc == 0) |
@@ -545,7 +545,7 @@ static int find_cifs_entry(const unsigned int xid, struct cifs_tcon *pTcon, | |||
545 | !cifsFile->invalidHandle) { | 545 | !cifsFile->invalidHandle) { |
546 | cifsFile->invalidHandle = true; | 546 | cifsFile->invalidHandle = true; |
547 | spin_unlock(&cifs_file_list_lock); | 547 | spin_unlock(&cifs_file_list_lock); |
548 | CIFSFindClose(xid, pTcon, cifsFile->netfid); | 548 | CIFSFindClose(xid, pTcon, cifsFile->fid.netfid); |
549 | } else | 549 | } else |
550 | spin_unlock(&cifs_file_list_lock); | 550 | spin_unlock(&cifs_file_list_lock); |
551 | if (cifsFile->srch_inf.ntwrk_buf_start) { | 551 | if (cifsFile->srch_inf.ntwrk_buf_start) { |
@@ -577,8 +577,8 @@ static int find_cifs_entry(const unsigned int xid, struct cifs_tcon *pTcon, | |||
577 | while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && | 577 | while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) && |
578 | (rc == 0) && !cifsFile->srch_inf.endOfSearch) { | 578 | (rc == 0) && !cifsFile->srch_inf.endOfSearch) { |
579 | cFYI(1, "calling findnext2"); | 579 | cFYI(1, "calling findnext2"); |
580 | rc = CIFSFindNext(xid, pTcon, cifsFile->netfid, search_flags, | 580 | rc = CIFSFindNext(xid, pTcon, cifsFile->fid.netfid, |
581 | &cifsFile->srch_inf); | 581 | search_flags, &cifsFile->srch_inf); |
582 | /* FindFirst/Next set last_entry to NULL on malformed reply */ | 582 | /* FindFirst/Next set last_entry to NULL on malformed reply */ |
583 | if (cifsFile->srch_inf.last_entry) | 583 | if (cifsFile->srch_inf.last_entry) |
584 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, | 584 | cifs_save_resume_key(cifsFile->srch_inf.last_entry, |
@@ -781,7 +781,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
781 | } | 781 | } |
782 | } /* else { | 782 | } /* else { |
783 | cifsFile->invalidHandle = true; | 783 | cifsFile->invalidHandle = true; |
784 | CIFSFindClose(xid, pTcon, cifsFile->netfid); | 784 | CIFSFindClose(xid, pTcon, cifsFile->fid.netfid); |
785 | } */ | 785 | } */ |
786 | 786 | ||
787 | pTcon = tlink_tcon(cifsFile->tlink); | 787 | pTcon = tlink_tcon(cifsFile->tlink); |