[PATCH 8/8] pnfs: merge identical functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pnfs_readhdr_free and pnfs_writehdr_free were identical - merge them
info pnfs_pgio_header_free. Also drop EXPORT_SYMBOL_GPL of static function.

Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxxxxxxx>
---
 fs/nfs/pnfs.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 79792a4..d45cca8 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1552,12 +1552,11 @@ pnfs_do_write(struct nfs_pageio_descriptor *desc,
 	pnfs_put_lseg(lseg);
 }
 
-static void pnfs_writehdr_free(struct nfs_pgio_header *hdr)
+static void pnfs_pgio_header_free(struct nfs_pgio_header *hdr)
 {
 	pnfs_put_lseg(hdr->lseg);
 	nfs_pgio_header_free(hdr);
 }
-EXPORT_SYMBOL_GPL(pnfs_writehdr_free);
 
 int
 pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
@@ -1572,7 +1571,7 @@ pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
 		desc->pg_lseg = NULL;
 		return -ENOMEM;
 	}
-	nfs_pgheader_init(desc, hdr, pnfs_writehdr_free);
+	nfs_pgheader_init(desc, hdr, pnfs_pgio_header_free);
 	hdr->lseg = pnfs_get_lseg(desc->pg_lseg);
 	ret = nfs_generic_pgio(desc, hdr);
 	if (ret != 0) {
@@ -1671,13 +1670,6 @@ pnfs_do_read(struct nfs_pageio_descriptor *desc, struct nfs_pgio_header *hdr)
 	pnfs_put_lseg(lseg);
 }
 
-static void pnfs_readhdr_free(struct nfs_pgio_header *hdr)
-{
-	pnfs_put_lseg(hdr->lseg);
-	nfs_pgio_header_free(hdr);
-}
-EXPORT_SYMBOL_GPL(pnfs_readhdr_free);
-
 int
 pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)
 {
@@ -1692,7 +1684,7 @@ pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)
 		desc->pg_lseg = NULL;
 		return ret;
 	}
-	nfs_pgheader_init(desc, hdr, pnfs_readhdr_free);
+	nfs_pgheader_init(desc, hdr, pnfs_pgio_header_free);
 	hdr->lseg = pnfs_get_lseg(desc->pg_lseg);
 	ret = nfs_generic_pgio(desc, hdr);
 	if (ret != 0) {
-- 
1.8.5.2 (Apple Git-48)

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux