diff options
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index d392a70092fe..3a2fc5c4c79a 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -88,10 +88,10 @@ struct nfs_write_header *nfs_writehdr_alloc(void) | |||
88 | } | 88 | } |
89 | EXPORT_SYMBOL_GPL(nfs_writehdr_alloc); | 89 | EXPORT_SYMBOL_GPL(nfs_writehdr_alloc); |
90 | 90 | ||
91 | static struct nfs_write_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr, | 91 | static struct nfs_pgio_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr, |
92 | unsigned int pagecount) | 92 | unsigned int pagecount) |
93 | { | 93 | { |
94 | struct nfs_write_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_write_header, header)->rpc_data; |
97 | if (prealloc->header == NULL) | 97 | if (prealloc->header == NULL) |
@@ -120,7 +120,7 @@ void nfs_writehdr_free(struct nfs_pgio_header *hdr) | |||
120 | } | 120 | } |
121 | EXPORT_SYMBOL_GPL(nfs_writehdr_free); | 121 | EXPORT_SYMBOL_GPL(nfs_writehdr_free); |
122 | 122 | ||
123 | void nfs_writedata_release(struct nfs_write_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_write_header *write_header = container_of(hdr, struct nfs_write_header, header); |
@@ -582,7 +582,7 @@ nfs_clear_request_commit(struct nfs_page *req) | |||
582 | } | 582 | } |
583 | 583 | ||
584 | static inline | 584 | static inline |
585 | int nfs_write_need_commit(struct nfs_write_data *data) | 585 | int nfs_write_need_commit(struct nfs_pgio_data *data) |
586 | { | 586 | { |
587 | if (data->verf.committed == NFS_DATA_SYNC) | 587 | if (data->verf.committed == NFS_DATA_SYNC) |
588 | return data->header->lseg == NULL; | 588 | return data->header->lseg == NULL; |
@@ -613,7 +613,7 @@ nfs_clear_request_commit(struct nfs_page *req) | |||
613 | } | 613 | } |
614 | 614 | ||
615 | static inline | 615 | static inline |
616 | int nfs_write_need_commit(struct nfs_write_data *data) | 616 | int nfs_write_need_commit(struct nfs_pgio_data *data) |
617 | { | 617 | { |
618 | return 0; | 618 | return 0; |
619 | } | 619 | } |
@@ -990,7 +990,7 @@ static int flush_task_priority(int how) | |||
990 | } | 990 | } |
991 | 991 | ||
992 | int nfs_initiate_write(struct rpc_clnt *clnt, | 992 | int nfs_initiate_write(struct rpc_clnt *clnt, |
993 | struct nfs_write_data *data, | 993 | struct nfs_pgio_data *data, |
994 | const struct rpc_call_ops *call_ops, | 994 | const struct rpc_call_ops *call_ops, |
995 | int how, int flags) | 995 | int how, int flags) |
996 | { | 996 | { |
@@ -1047,7 +1047,7 @@ EXPORT_SYMBOL_GPL(nfs_initiate_write); | |||
1047 | /* | 1047 | /* |
1048 | * Set up the argument/result storage required for the RPC call. | 1048 | * Set up the argument/result storage required for the RPC call. |
1049 | */ | 1049 | */ |
1050 | static void nfs_write_rpcsetup(struct nfs_write_data *data, | 1050 | static void nfs_write_rpcsetup(struct nfs_pgio_data *data, |
1051 | unsigned int count, unsigned int offset, | 1051 | unsigned int count, unsigned int offset, |
1052 | int how, struct nfs_commit_info *cinfo) | 1052 | int how, struct nfs_commit_info *cinfo) |
1053 | { | 1053 | { |
@@ -1082,7 +1082,7 @@ static void nfs_write_rpcsetup(struct nfs_write_data *data, | |||
1082 | nfs_fattr_init(&data->fattr); | 1082 | nfs_fattr_init(&data->fattr); |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | static int nfs_do_write(struct nfs_write_data *data, | 1085 | static int nfs_do_write(struct nfs_pgio_data *data, |
1086 | const struct rpc_call_ops *call_ops, | 1086 | const struct rpc_call_ops *call_ops, |
1087 | int how) | 1087 | int how) |
1088 | { | 1088 | { |
@@ -1095,13 +1095,13 @@ static int nfs_do_multiple_writes(struct list_head *head, | |||
1095 | const struct rpc_call_ops *call_ops, | 1095 | const struct rpc_call_ops *call_ops, |
1096 | int how) | 1096 | int how) |
1097 | { | 1097 | { |
1098 | struct nfs_write_data *data; | 1098 | struct nfs_pgio_data *data; |
1099 | int ret = 0; | 1099 | int ret = 0; |
1100 | 1100 | ||
1101 | while (!list_empty(head)) { | 1101 | while (!list_empty(head)) { |
1102 | int ret2; | 1102 | int ret2; |
1103 | 1103 | ||
1104 | data = list_first_entry(head, struct nfs_write_data, list); | 1104 | data = list_first_entry(head, struct nfs_pgio_data, list); |
1105 | list_del_init(&data->list); | 1105 | list_del_init(&data->list); |
1106 | 1106 | ||
1107 | ret2 = nfs_do_write(data, call_ops, how); | 1107 | ret2 = nfs_do_write(data, call_ops, how); |
@@ -1144,8 +1144,8 @@ static void nfs_flush_error(struct nfs_pageio_descriptor *desc, | |||
1144 | { | 1144 | { |
1145 | set_bit(NFS_IOHDR_REDO, &hdr->flags); | 1145 | set_bit(NFS_IOHDR_REDO, &hdr->flags); |
1146 | while (!list_empty(&hdr->rpc_list)) { | 1146 | while (!list_empty(&hdr->rpc_list)) { |
1147 | struct nfs_write_data *data = list_first_entry(&hdr->rpc_list, | 1147 | struct nfs_pgio_data *data = list_first_entry(&hdr->rpc_list, |
1148 | struct nfs_write_data, list); | 1148 | struct nfs_pgio_data, list); |
1149 | list_del(&data->list); | 1149 | list_del(&data->list); |
1150 | nfs_writedata_release(data); | 1150 | nfs_writedata_release(data); |
1151 | } | 1151 | } |
@@ -1161,7 +1161,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc, | |||
1161 | { | 1161 | { |
1162 | struct nfs_page *req = hdr->req; | 1162 | struct nfs_page *req = hdr->req; |
1163 | struct page *page = req->wb_page; | 1163 | struct page *page = req->wb_page; |
1164 | struct nfs_write_data *data; | 1164 | struct nfs_pgio_data *data; |
1165 | size_t wsize = desc->pg_bsize, nbytes; | 1165 | size_t wsize = desc->pg_bsize, nbytes; |
1166 | unsigned int offset; | 1166 | unsigned int offset; |
1167 | int requests = 0; | 1167 | int requests = 0; |
@@ -1211,7 +1211,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc, | |||
1211 | { | 1211 | { |
1212 | struct nfs_page *req; | 1212 | struct nfs_page *req; |
1213 | struct page **pages; | 1213 | struct page **pages; |
1214 | struct nfs_write_data *data; | 1214 | struct nfs_pgio_data *data; |
1215 | struct list_head *head = &desc->pg_list; | 1215 | struct list_head *head = &desc->pg_list; |
1216 | struct nfs_commit_info cinfo; | 1216 | struct nfs_commit_info cinfo; |
1217 | 1217 | ||
@@ -1305,7 +1305,7 @@ EXPORT_SYMBOL_GPL(nfs_pageio_reset_write_mds); | |||
1305 | 1305 | ||
1306 | void nfs_write_prepare(struct rpc_task *task, void *calldata) | 1306 | void nfs_write_prepare(struct rpc_task *task, void *calldata) |
1307 | { | 1307 | { |
1308 | struct nfs_write_data *data = calldata; | 1308 | struct nfs_pgio_data *data = calldata; |
1309 | int err; | 1309 | int err; |
1310 | err = NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data); | 1310 | err = NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data); |
1311 | if (err) | 1311 | if (err) |
@@ -1328,14 +1328,14 @@ void nfs_commit_prepare(struct rpc_task *task, void *calldata) | |||
1328 | */ | 1328 | */ |
1329 | static void nfs_writeback_done_common(struct rpc_task *task, void *calldata) | 1329 | static void nfs_writeback_done_common(struct rpc_task *task, void *calldata) |
1330 | { | 1330 | { |
1331 | struct nfs_write_data *data = calldata; | 1331 | struct nfs_pgio_data *data = calldata; |
1332 | 1332 | ||
1333 | nfs_writeback_done(task, data); | 1333 | nfs_writeback_done(task, data); |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | static void nfs_writeback_release_common(void *calldata) | 1336 | static void nfs_writeback_release_common(void *calldata) |
1337 | { | 1337 | { |
1338 | struct nfs_write_data *data = calldata; | 1338 | struct nfs_pgio_data *data = calldata; |
1339 | struct nfs_pgio_header *hdr = data->header; | 1339 | struct nfs_pgio_header *hdr = data->header; |
1340 | int status = data->task.tk_status; | 1340 | int status = data->task.tk_status; |
1341 | 1341 | ||
@@ -1386,7 +1386,7 @@ static int nfs_should_remove_suid(const struct inode *inode) | |||
1386 | /* | 1386 | /* |
1387 | * This function is called when the WRITE call is complete. | 1387 | * This function is called when the WRITE call is complete. |
1388 | */ | 1388 | */ |
1389 | void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) | 1389 | void nfs_writeback_done(struct rpc_task *task, struct nfs_pgio_data *data) |
1390 | { | 1390 | { |
1391 | struct nfs_pgio_args *argp = &data->args; | 1391 | struct nfs_pgio_args *argp = &data->args; |
1392 | struct nfs_pgio_res *resp = &data->res; | 1392 | struct nfs_pgio_res *resp = &data->res; |