diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 2789cb3fc425..42e66e961d73 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -701,11 +701,12 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
701 | int res = 0; | 701 | int res = 0; |
702 | struct nfs_cache_array *array = NULL; | 702 | struct nfs_cache_array *array = NULL; |
703 | unsigned int d_type = DT_UNKNOWN; | 703 | unsigned int d_type = DT_UNKNOWN; |
704 | struct dentry *dentry = NULL; | ||
705 | 704 | ||
706 | array = nfs_readdir_get_array(desc->page); | 705 | array = nfs_readdir_get_array(desc->page); |
707 | if (IS_ERR(array)) | 706 | if (IS_ERR(array)) { |
708 | return PTR_ERR(array); | 707 | res = PTR_ERR(array); |
708 | goto out; | ||
709 | } | ||
709 | 710 | ||
710 | for (i = desc->cache_entry_index; i < array->size; i++) { | 711 | for (i = desc->cache_entry_index; i < array->size; i++) { |
711 | d_type = DT_UNKNOWN; | 712 | d_type = DT_UNKNOWN; |
@@ -726,9 +727,8 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
726 | desc->eof = 1; | 727 | desc->eof = 1; |
727 | 728 | ||
728 | nfs_readdir_release_array(desc->page); | 729 | nfs_readdir_release_array(desc->page); |
730 | out: | ||
729 | cache_page_release(desc); | 731 | cache_page_release(desc); |
730 | if (dentry != NULL) | ||
731 | dput(dentry); | ||
732 | dfprintk(DIRCACHE, "NFS: nfs_do_filldir() filling ended @ cookie %Lu; returning = %d\n", | 732 | dfprintk(DIRCACHE, "NFS: nfs_do_filldir() filling ended @ cookie %Lu; returning = %d\n", |
733 | (unsigned long long)*desc->dir_cookie, res); | 733 | (unsigned long long)*desc->dir_cookie, res); |
734 | return res; | 734 | return res; |