diff options
-rw-r--r-- | fs/nfs/internal.h | 4 | ||||
-rw-r--r-- | fs/nfs/pnfs.c | 4 | ||||
-rw-r--r-- | fs/nfs/read.c | 14 | ||||
-rw-r--r-- | fs/nfs/write.c | 14 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 7 |
5 files changed, 19 insertions, 24 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index af01b80412dd..b0e7a41d14a8 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -395,7 +395,7 @@ extern int nfs4_get_rootfh(struct nfs_server *server, struct nfs_fh *mntfh, bool | |||
395 | 395 | ||
396 | struct nfs_pgio_completion_ops; | 396 | struct nfs_pgio_completion_ops; |
397 | /* read.c */ | 397 | /* read.c */ |
398 | extern struct nfs_read_header *nfs_readhdr_alloc(void); | 398 | extern struct nfs_rw_header *nfs_readhdr_alloc(void); |
399 | extern void nfs_readhdr_free(struct nfs_pgio_header *hdr); | 399 | extern void nfs_readhdr_free(struct nfs_pgio_header *hdr); |
400 | extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, | 400 | extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, |
401 | struct inode *inode, bool force_mds, | 401 | struct inode *inode, bool force_mds, |
@@ -424,7 +424,7 @@ int nfs_remount(struct super_block *sb, int *flags, char *raw_data); | |||
424 | extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, | 424 | extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, |
425 | struct inode *inode, int ioflags, bool force_mds, | 425 | struct inode *inode, int ioflags, bool force_mds, |
426 | const struct nfs_pgio_completion_ops *compl_ops); | 426 | const struct nfs_pgio_completion_ops *compl_ops); |
427 | extern struct nfs_write_header *nfs_writehdr_alloc(void); | 427 | extern struct nfs_rw_header *nfs_writehdr_alloc(void); |
428 | extern void nfs_writehdr_free(struct nfs_pgio_header *hdr); | 428 | extern void nfs_writehdr_free(struct nfs_pgio_header *hdr); |
429 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, | 429 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, |
430 | struct nfs_pgio_header *hdr); | 430 | struct nfs_pgio_header *hdr); |
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index e9cea3ab7cf9..43cfe11aa1a4 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1592,7 +1592,7 @@ EXPORT_SYMBOL_GPL(pnfs_writehdr_free); | |||
1592 | int | 1592 | int |
1593 | pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) | 1593 | pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) |
1594 | { | 1594 | { |
1595 | struct nfs_write_header *whdr; | 1595 | struct nfs_rw_header *whdr; |
1596 | struct nfs_pgio_header *hdr; | 1596 | struct nfs_pgio_header *hdr; |
1597 | int ret; | 1597 | int ret; |
1598 | 1598 | ||
@@ -1750,7 +1750,7 @@ EXPORT_SYMBOL_GPL(pnfs_readhdr_free); | |||
1750 | int | 1750 | int |
1751 | pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) | 1751 | pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) |
1752 | { | 1752 | { |
1753 | struct nfs_read_header *rhdr; | 1753 | struct nfs_rw_header *rhdr; |
1754 | struct nfs_pgio_header *hdr; | 1754 | struct nfs_pgio_header *hdr; |
1755 | int ret; | 1755 | int ret; |
1756 | 1756 | ||
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 9e426cc179ed..d29ca3673694 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -34,9 +34,9 @@ static const struct nfs_pgio_completion_ops nfs_async_read_completion_ops; | |||
34 | 34 | ||
35 | static struct kmem_cache *nfs_rdata_cachep; | 35 | static struct kmem_cache *nfs_rdata_cachep; |
36 | 36 | ||
37 | struct nfs_read_header *nfs_readhdr_alloc(void) | 37 | struct nfs_rw_header *nfs_readhdr_alloc(void) |
38 | { | 38 | { |
39 | struct nfs_read_header *rhdr; | 39 | struct nfs_rw_header *rhdr; |
40 | 40 | ||
41 | rhdr = kmem_cache_zalloc(nfs_rdata_cachep, GFP_KERNEL); | 41 | rhdr = kmem_cache_zalloc(nfs_rdata_cachep, GFP_KERNEL); |
42 | if (rhdr) { | 42 | if (rhdr) { |
@@ -56,7 +56,7 @@ static struct nfs_pgio_data *nfs_readdata_alloc(struct nfs_pgio_header *hdr, | |||
56 | { | 56 | { |
57 | struct nfs_pgio_data *data, *prealloc; | 57 | struct nfs_pgio_data *data, *prealloc; |
58 | 58 | ||
59 | prealloc = &container_of(hdr, struct nfs_read_header, header)->rpc_data; | 59 | prealloc = &container_of(hdr, struct nfs_rw_header, header)->rpc_data; |
60 | if (prealloc->header == NULL) | 60 | if (prealloc->header == NULL) |
61 | data = prealloc; | 61 | data = prealloc; |
62 | else | 62 | else |
@@ -78,7 +78,7 @@ out: | |||
78 | 78 | ||
79 | void nfs_readhdr_free(struct nfs_pgio_header *hdr) | 79 | void nfs_readhdr_free(struct nfs_pgio_header *hdr) |
80 | { | 80 | { |
81 | struct nfs_read_header *rhdr = container_of(hdr, struct nfs_read_header, header); | 81 | struct nfs_rw_header *rhdr = container_of(hdr, struct nfs_rw_header, header); |
82 | 82 | ||
83 | kmem_cache_free(nfs_rdata_cachep, rhdr); | 83 | kmem_cache_free(nfs_rdata_cachep, rhdr); |
84 | } | 84 | } |
@@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(nfs_readhdr_free); | |||
87 | void nfs_readdata_release(struct nfs_pgio_data *rdata) | 87 | void nfs_readdata_release(struct nfs_pgio_data *rdata) |
88 | { | 88 | { |
89 | struct nfs_pgio_header *hdr = rdata->header; | 89 | struct nfs_pgio_header *hdr = rdata->header; |
90 | struct nfs_read_header *read_header = container_of(hdr, struct nfs_read_header, header); | 90 | struct nfs_rw_header *read_header = container_of(hdr, struct nfs_rw_header, header); |
91 | 91 | ||
92 | put_nfs_open_context(rdata->args.context); | 92 | put_nfs_open_context(rdata->args.context); |
93 | if (rdata->pages.pagevec != rdata->pages.page_array) | 93 | if (rdata->pages.pagevec != rdata->pages.page_array) |
@@ -417,7 +417,7 @@ EXPORT_SYMBOL_GPL(nfs_generic_pagein); | |||
417 | 417 | ||
418 | static int nfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) | 418 | static int nfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc) |
419 | { | 419 | { |
420 | struct nfs_read_header *rhdr; | 420 | struct nfs_rw_header *rhdr; |
421 | struct nfs_pgio_header *hdr; | 421 | struct nfs_pgio_header *hdr; |
422 | int ret; | 422 | int ret; |
423 | 423 | ||
@@ -680,7 +680,7 @@ out: | |||
680 | int __init nfs_init_readpagecache(void) | 680 | int __init nfs_init_readpagecache(void) |
681 | { | 681 | { |
682 | nfs_rdata_cachep = kmem_cache_create("nfs_read_data", | 682 | nfs_rdata_cachep = kmem_cache_create("nfs_read_data", |
683 | sizeof(struct nfs_read_header), | 683 | sizeof(struct nfs_rw_header), |
684 | 0, SLAB_HWCACHE_ALIGN, | 684 | 0, SLAB_HWCACHE_ALIGN, |
685 | NULL); | 685 | NULL); |
686 | if (nfs_rdata_cachep == NULL) | 686 | if (nfs_rdata_cachep == NULL) |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 3a2fc5c4c79a..37c4c988519c 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -70,9 +70,9 @@ void nfs_commit_free(struct nfs_commit_data *p) | |||
70 | } | 70 | } |
71 | EXPORT_SYMBOL_GPL(nfs_commit_free); | 71 | EXPORT_SYMBOL_GPL(nfs_commit_free); |
72 | 72 | ||
73 | struct nfs_write_header *nfs_writehdr_alloc(void) | 73 | struct nfs_rw_header *nfs_writehdr_alloc(void) |
74 | { | 74 | { |
75 | struct nfs_write_header *p = mempool_alloc(nfs_wdata_mempool, GFP_NOIO); | 75 | struct nfs_rw_header *p = mempool_alloc(nfs_wdata_mempool, GFP_NOIO); |
76 | 76 | ||
77 | if (p) { | 77 | if (p) { |
78 | struct nfs_pgio_header *hdr = &p->header; | 78 | struct nfs_pgio_header *hdr = &p->header; |
@@ -93,7 +93,7 @@ static struct nfs_pgio_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr, | |||
93 | { | 93 | { |
94 | struct nfs_pgio_data *data, *prealloc; | 94 | struct nfs_pgio_data *data, *prealloc; |
95 | 95 | ||
96 | prealloc = &container_of(hdr, struct nfs_write_header, header)->rpc_data; | 96 | prealloc = &container_of(hdr, struct nfs_rw_header, header)->rpc_data; |
97 | if (prealloc->header == NULL) | 97 | if (prealloc->header == NULL) |
98 | data = prealloc; | 98 | data = prealloc; |
99 | else | 99 | else |
@@ -115,7 +115,7 @@ out: | |||
115 | 115 | ||
116 | void nfs_writehdr_free(struct nfs_pgio_header *hdr) | 116 | void nfs_writehdr_free(struct nfs_pgio_header *hdr) |
117 | { | 117 | { |
118 | struct nfs_write_header *whdr = container_of(hdr, struct nfs_write_header, header); | 118 | struct nfs_rw_header *whdr = container_of(hdr, struct nfs_rw_header, header); |
119 | mempool_free(whdr, nfs_wdata_mempool); | 119 | mempool_free(whdr, nfs_wdata_mempool); |
120 | } | 120 | } |
121 | EXPORT_SYMBOL_GPL(nfs_writehdr_free); | 121 | EXPORT_SYMBOL_GPL(nfs_writehdr_free); |
@@ -123,7 +123,7 @@ EXPORT_SYMBOL_GPL(nfs_writehdr_free); | |||
123 | void nfs_writedata_release(struct nfs_pgio_data *wdata) | 123 | void nfs_writedata_release(struct nfs_pgio_data *wdata) |
124 | { | 124 | { |
125 | struct nfs_pgio_header *hdr = wdata->header; | 125 | struct nfs_pgio_header *hdr = wdata->header; |
126 | struct nfs_write_header *write_header = container_of(hdr, struct nfs_write_header, header); | 126 | struct nfs_rw_header *write_header = container_of(hdr, struct nfs_rw_header, header); |
127 | 127 | ||
128 | put_nfs_open_context(wdata->args.context); | 128 | put_nfs_open_context(wdata->args.context); |
129 | if (wdata->pages.pagevec != wdata->pages.page_array) | 129 | if (wdata->pages.pagevec != wdata->pages.page_array) |
@@ -1253,7 +1253,7 @@ EXPORT_SYMBOL_GPL(nfs_generic_flush); | |||
1253 | 1253 | ||
1254 | static int nfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) | 1254 | static int nfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) |
1255 | { | 1255 | { |
1256 | struct nfs_write_header *whdr; | 1256 | struct nfs_rw_header *whdr; |
1257 | struct nfs_pgio_header *hdr; | 1257 | struct nfs_pgio_header *hdr; |
1258 | int ret; | 1258 | int ret; |
1259 | 1259 | ||
@@ -1910,7 +1910,7 @@ int nfs_migrate_page(struct address_space *mapping, struct page *newpage, | |||
1910 | int __init nfs_init_writepagecache(void) | 1910 | int __init nfs_init_writepagecache(void) |
1911 | { | 1911 | { |
1912 | nfs_wdata_cachep = kmem_cache_create("nfs_write_data", | 1912 | nfs_wdata_cachep = kmem_cache_create("nfs_write_data", |
1913 | sizeof(struct nfs_write_header), | 1913 | sizeof(struct nfs_rw_header), |
1914 | 0, SLAB_HWCACHE_ALIGN, | 1914 | 0, SLAB_HWCACHE_ALIGN, |
1915 | NULL); | 1915 | NULL); |
1916 | if (nfs_wdata_cachep == NULL) | 1916 | if (nfs_wdata_cachep == NULL) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 64f6f1491c0d..2d34e0dc1870 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -1294,12 +1294,7 @@ struct nfs_pgio_data { | |||
1294 | struct nfs_client *ds_clp; /* pNFS data server */ | 1294 | struct nfs_client *ds_clp; /* pNFS data server */ |
1295 | }; | 1295 | }; |
1296 | 1296 | ||
1297 | struct nfs_read_header { | 1297 | struct nfs_rw_header { |
1298 | struct nfs_pgio_header header; | ||
1299 | struct nfs_pgio_data rpc_data; | ||
1300 | }; | ||
1301 | |||
1302 | struct nfs_write_header { | ||
1303 | struct nfs_pgio_header header; | 1298 | struct nfs_pgio_header header; |
1304 | struct nfs_pgio_data rpc_data; | 1299 | struct nfs_pgio_data rpc_data; |
1305 | struct nfs_writeverf verf; | 1300 | struct nfs_writeverf verf; |