diff options
-rw-r--r-- | fs/nfs/write.c | 4 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 875f5b060533..f7c8be0beccf 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -91,7 +91,7 @@ static mempool_t *nfs_commit_mempool; | |||
91 | 91 | ||
92 | static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); | 92 | static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); |
93 | 93 | ||
94 | static inline struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) | 94 | struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) |
95 | { | 95 | { |
96 | struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); | 96 | struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); |
97 | 97 | ||
@@ -112,7 +112,7 @@ static inline struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) | |||
112 | return p; | 112 | return p; |
113 | } | 113 | } |
114 | 114 | ||
115 | static inline void nfs_commit_free(struct nfs_write_data *p) | 115 | void nfs_commit_free(struct nfs_write_data *p) |
116 | { | 116 | { |
117 | if (p && (p->pagevec != &p->page_array[0])) | 117 | if (p && (p->pagevec != &p->page_array[0])) |
118 | kfree(p->pagevec); | 118 | kfree(p->pagevec); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 6c130a6b0f4d..423f202b881c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -410,6 +410,11 @@ extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned | |||
410 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); | 410 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); |
411 | extern void nfs_writedata_release(void *); | 411 | extern void nfs_writedata_release(void *); |
412 | 412 | ||
413 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | ||
414 | struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount); | ||
415 | void nfs_commit_free(struct nfs_write_data *p); | ||
416 | #endif | ||
417 | |||
413 | /* | 418 | /* |
414 | * Try to write back everything synchronously (but check the | 419 | * Try to write back everything synchronously (but check the |
415 | * return value!) | 420 | * return value!) |