diff options
-rw-r--r-- | fs/nfs/dir.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f77243907a08..33b0ce7a97be 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -491,10 +491,6 @@ static inline | |||
491 | int readdir_search_pagecache(nfs_readdir_descriptor_t *desc) | 491 | int readdir_search_pagecache(nfs_readdir_descriptor_t *desc) |
492 | { | 492 | { |
493 | int res = -EAGAIN; | 493 | int res = -EAGAIN; |
494 | desc->page_index = 0; | ||
495 | |||
496 | if (*desc->dir_cookie == 0) | ||
497 | desc->cache_entry_index = 0; | ||
498 | 494 | ||
499 | while (1) { | 495 | while (1) { |
500 | res = find_cache_page(desc); | 496 | res = find_cache_page(desc); |
@@ -589,6 +585,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
589 | goto out_release; | 585 | goto out_release; |
590 | } | 586 | } |
591 | 587 | ||
588 | desc->page_index = 0; | ||
592 | desc->page = page; | 589 | desc->page = page; |
593 | status = nfs_do_filldir(desc, dirent, filldir); | 590 | status = nfs_do_filldir(desc, dirent, filldir); |
594 | 591 | ||
@@ -653,6 +650,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
653 | if (res == -ETOOSMALL && desc->plus) { | 650 | if (res == -ETOOSMALL && desc->plus) { |
654 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); | 651 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); |
655 | nfs_zap_caches(inode); | 652 | nfs_zap_caches(inode); |
653 | desc->page_index = 0; | ||
656 | desc->plus = 0; | 654 | desc->plus = 0; |
657 | desc->eof = 0; | 655 | desc->eof = 0; |
658 | continue; | 656 | continue; |