aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index cae5d160d835..e7aeda0663c5 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -59,6 +59,7 @@ struct nfs_write_data *nfs_commitdata_alloc(void)
59 } 59 }
60 return p; 60 return p;
61} 61}
62EXPORT_SYMBOL_GPL(nfs_commitdata_alloc);
62 63
63void nfs_commit_free(struct nfs_write_data *p) 64void nfs_commit_free(struct nfs_write_data *p)
64{ 65{
@@ -66,6 +67,7 @@ void nfs_commit_free(struct nfs_write_data *p)
66 kfree(p->pagevec); 67 kfree(p->pagevec);
67 mempool_free(p, nfs_commit_mempool); 68 mempool_free(p, nfs_commit_mempool);
68} 69}
70EXPORT_SYMBOL_GPL(nfs_commit_free);
69 71
70struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) 72struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount)
71{ 73{
@@ -1283,15 +1285,15 @@ static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait)
1283 return (ret < 0) ? ret : 1; 1285 return (ret < 0) ? ret : 1;
1284} 1286}
1285 1287
1286static void nfs_commit_clear_lock(struct nfs_inode *nfsi) 1288void nfs_commit_clear_lock(struct nfs_inode *nfsi)
1287{ 1289{
1288 clear_bit(NFS_INO_COMMIT, &nfsi->flags); 1290 clear_bit(NFS_INO_COMMIT, &nfsi->flags);
1289 smp_mb__after_clear_bit(); 1291 smp_mb__after_clear_bit();
1290 wake_up_bit(&nfsi->flags, NFS_INO_COMMIT); 1292 wake_up_bit(&nfsi->flags, NFS_INO_COMMIT);
1291} 1293}
1294EXPORT_SYMBOL_GPL(nfs_commit_clear_lock);
1292 1295
1293 1296void nfs_commitdata_release(void *data)
1294static void nfs_commitdata_release(void *data)
1295{ 1297{
1296 struct nfs_write_data *wdata = data; 1298 struct nfs_write_data *wdata = data;
1297 1299
@@ -1299,8 +1301,9 @@ static void nfs_commitdata_release(void *data)
1299 put_nfs_open_context(wdata->args.context); 1301 put_nfs_open_context(wdata->args.context);
1300 nfs_commit_free(wdata); 1302 nfs_commit_free(wdata);
1301} 1303}
1304EXPORT_SYMBOL_GPL(nfs_commitdata_release);
1302 1305
1303static int nfs_initiate_commit(struct nfs_write_data *data, struct rpc_clnt *clnt, 1306int nfs_initiate_commit(struct nfs_write_data *data, struct rpc_clnt *clnt,
1304 const struct rpc_call_ops *call_ops, 1307 const struct rpc_call_ops *call_ops,
1305 int how) 1308 int how)
1306{ 1309{
@@ -1334,11 +1337,12 @@ static int nfs_initiate_commit(struct nfs_write_data *data, struct rpc_clnt *cln
1334 rpc_put_task(task); 1337 rpc_put_task(task);
1335 return 0; 1338 return 0;
1336} 1339}
1340EXPORT_SYMBOL_GPL(nfs_initiate_commit);
1337 1341
1338/* 1342/*
1339 * Set up the argument/result storage required for the RPC call. 1343 * Set up the argument/result storage required for the RPC call.
1340 */ 1344 */
1341static void nfs_init_commit(struct nfs_write_data *data, 1345void nfs_init_commit(struct nfs_write_data *data,
1342 struct list_head *head, 1346 struct list_head *head,
1343 struct pnfs_layout_segment *lseg) 1347 struct pnfs_layout_segment *lseg)
1344{ 1348{
@@ -1365,8 +1369,9 @@ static void nfs_init_commit(struct nfs_write_data *data,
1365 data->res.verf = &data->verf; 1369 data->res.verf = &data->verf;
1366 nfs_fattr_init(&data->fattr); 1370 nfs_fattr_init(&data->fattr);
1367} 1371}
1372EXPORT_SYMBOL_GPL(nfs_init_commit);
1368 1373
1369static void nfs_retry_commit(struct list_head *page_list, 1374void nfs_retry_commit(struct list_head *page_list,
1370 struct pnfs_layout_segment *lseg) 1375 struct pnfs_layout_segment *lseg)
1371{ 1376{
1372 struct nfs_page *req; 1377 struct nfs_page *req;
@@ -1381,6 +1386,7 @@ static void nfs_retry_commit(struct list_head *page_list,
1381 nfs_clear_page_tag_locked(req); 1386 nfs_clear_page_tag_locked(req);
1382 } 1387 }
1383} 1388}
1389EXPORT_SYMBOL_GPL(nfs_retry_commit);
1384 1390
1385/* 1391/*
1386 * Commit dirty pages 1392 * Commit dirty pages
@@ -1419,7 +1425,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
1419 return; 1425 return;
1420} 1426}
1421 1427
1422static void nfs_commit_release_pages(struct nfs_write_data *data) 1428void nfs_commit_release_pages(struct nfs_write_data *data)
1423{ 1429{
1424 struct nfs_page *req; 1430 struct nfs_page *req;
1425 int status = data->task.tk_status; 1431 int status = data->task.tk_status;
@@ -1456,6 +1462,7 @@ static void nfs_commit_release_pages(struct nfs_write_data *data)
1456 nfs_clear_page_tag_locked(req); 1462 nfs_clear_page_tag_locked(req);
1457 } 1463 }
1458} 1464}
1465EXPORT_SYMBOL_GPL(nfs_commit_release_pages);
1459 1466
1460static void nfs_commit_release(void *calldata) 1467static void nfs_commit_release(void *calldata)
1461{ 1468{