aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2c3eb33b904d..c5c71cb62fbd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -290,7 +290,6 @@ int nfs_readdir_search_for_pos(struct nfs_cache_array *array, nfs_readdir_descri
290 if (diff >= array->size) { 290 if (diff >= array->size) {
291 if (array->eof_index >= 0) 291 if (array->eof_index >= 0)
292 goto out_eof; 292 goto out_eof;
293 desc->current_index += array->size;
294 return -EAGAIN; 293 return -EAGAIN;
295 } 294 }
296 295
@@ -311,6 +310,7 @@ int nfs_readdir_search_for_cookie(struct nfs_cache_array *array, nfs_readdir_des
311 310
312 for (i = 0; i < array->size; i++) { 311 for (i = 0; i < array->size; i++) {
313 if (array->array[i].cookie == *desc->dir_cookie) { 312 if (array->array[i].cookie == *desc->dir_cookie) {
313 desc->file->f_pos = desc->current_index + i;
314 desc->cache_entry_index = i; 314 desc->cache_entry_index = i;
315 return 0; 315 return 0;
316 } 316 }
@@ -342,6 +342,7 @@ int nfs_readdir_search_array(nfs_readdir_descriptor_t *desc)
342 342
343 if (status == -EAGAIN) { 343 if (status == -EAGAIN) {
344 desc->last_cookie = array->last_cookie; 344 desc->last_cookie = array->last_cookie;
345 desc->current_index += array->size;
345 desc->page_index++; 346 desc->page_index++;
346 } 347 }
347 nfs_readdir_release_array(desc->page); 348 nfs_readdir_release_array(desc->page);