Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: Rename nfs_readdir_free_pagearray() and nfs_readdir_large_page()

nfs_readdir_xdr_to_array() uses both a cache array and an array of
pages, so I rename these functions to make it clearer how the code
works. nfs_readdir_large_page() becomes nfs_readdir_alloc_pages()
because this function has absolutely nothing to do with setting up a
large page. nfs_readdir_free_pagearray() becomes
nfs_readdir_free_pages() to stay consistent with the new alloc_pages()
function.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

authored by

Anna Schumaker and committed by
Trond Myklebust
c7e9668e 0b936e37

+5 -5
+5 -5
fs/nfs/dir.c
··· 583 583 } 584 584 585 585 static 586 - void nfs_readdir_free_pagearray(struct page **pages, unsigned int npages) 586 + void nfs_readdir_free_pages(struct page **pages, unsigned int npages) 587 587 { 588 588 unsigned int i; 589 589 for (i = 0; i < npages; i++) ··· 595 595 * to nfs_readdir_free_pagearray 596 596 */ 597 597 static 598 - int nfs_readdir_large_page(struct page **pages, unsigned int npages) 598 + int nfs_readdir_alloc_pages(struct page **pages, unsigned int npages) 599 599 { 600 600 unsigned int i; 601 601 ··· 608 608 return 0; 609 609 610 610 out_freepages: 611 - nfs_readdir_free_pagearray(pages, i); 611 + nfs_readdir_free_pages(pages, i); 612 612 return -ENOMEM; 613 613 } 614 614 ··· 645 645 memset(array, 0, sizeof(struct nfs_cache_array)); 646 646 array->eof_index = -1; 647 647 648 - status = nfs_readdir_large_page(pages, array_size); 648 + status = nfs_readdir_alloc_pages(pages, array_size); 649 649 if (status < 0) 650 650 goto out_release_array; 651 651 do { ··· 663 663 } 664 664 } while (array->eof_index < 0); 665 665 666 - nfs_readdir_free_pagearray(pages, array_size); 666 + nfs_readdir_free_pages(pages, array_size); 667 667 out_release_array: 668 668 nfs_readdir_release_array(page); 669 669 out_label_free: