diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-22 18:40:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:43:44 -0400 |
commit | 3d4ff43d895c50319af45eb4bf04a4618eccdf76 (patch) | |
tree | b412cd076920a903a854a20bceed4a0ce511fd13 /fs | |
parent | 82a2c1b77ada3b81911deeb871719ec5ff77f83c (diff) |
nfs_open_context doesn't need struct path either
just dentry, please...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/dir.c | 14 | ||||
-rw-r--r-- | fs/nfs/direct.c | 4 | ||||
-rw-r--r-- | fs/nfs/inode.c | 20 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 | ||||
-rw-r--r-- | fs/nfs/pagelist.c | 4 | ||||
-rw-r--r-- | fs/nfs/read.c | 8 | ||||
-rw-r--r-- | fs/nfs/write.c | 22 |
7 files changed, 40 insertions, 42 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index a86acd6d0cb4..a0693f3f11c0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1345,10 +1345,6 @@ static int is_atomic_open(struct nameidata *nd) | |||
1345 | 1345 | ||
1346 | static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *dentry, struct nameidata *nd) | 1346 | static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *dentry, struct nameidata *nd) |
1347 | { | 1347 | { |
1348 | struct path path = { | ||
1349 | .mnt = nd->path.mnt, | ||
1350 | .dentry = dentry, | ||
1351 | }; | ||
1352 | struct nfs_open_context *ctx; | 1348 | struct nfs_open_context *ctx; |
1353 | struct rpc_cred *cred; | 1349 | struct rpc_cred *cred; |
1354 | fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC); | 1350 | fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC); |
@@ -1356,7 +1352,7 @@ static struct nfs_open_context *nameidata_to_nfs_open_context(struct dentry *den | |||
1356 | cred = rpc_lookup_cred(); | 1352 | cred = rpc_lookup_cred(); |
1357 | if (IS_ERR(cred)) | 1353 | if (IS_ERR(cred)) |
1358 | return ERR_CAST(cred); | 1354 | return ERR_CAST(cred); |
1359 | ctx = alloc_nfs_open_context(&path, cred, fmode); | 1355 | ctx = alloc_nfs_open_context(dentry, cred, fmode); |
1360 | put_rpccred(cred); | 1356 | put_rpccred(cred); |
1361 | if (ctx == NULL) | 1357 | if (ctx == NULL) |
1362 | return ERR_PTR(-ENOMEM); | 1358 | return ERR_PTR(-ENOMEM); |
@@ -1376,13 +1372,13 @@ static int nfs_intent_set_file(struct nameidata *nd, struct nfs_open_context *ct | |||
1376 | 1372 | ||
1377 | /* If the open_intent is for execute, we have an extra check to make */ | 1373 | /* If the open_intent is for execute, we have an extra check to make */ |
1378 | if (ctx->mode & FMODE_EXEC) { | 1374 | if (ctx->mode & FMODE_EXEC) { |
1379 | ret = nfs_may_open(ctx->path.dentry->d_inode, | 1375 | ret = nfs_may_open(ctx->dentry->d_inode, |
1380 | ctx->cred, | 1376 | ctx->cred, |
1381 | nd->intent.open.flags); | 1377 | nd->intent.open.flags); |
1382 | if (ret < 0) | 1378 | if (ret < 0) |
1383 | goto out; | 1379 | goto out; |
1384 | } | 1380 | } |
1385 | filp = lookup_instantiate_filp(nd, ctx->path.dentry, do_open); | 1381 | filp = lookup_instantiate_filp(nd, ctx->dentry, do_open); |
1386 | if (IS_ERR(filp)) | 1382 | if (IS_ERR(filp)) |
1387 | ret = PTR_ERR(filp); | 1383 | ret = PTR_ERR(filp); |
1388 | else | 1384 | else |
@@ -1463,8 +1459,8 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry | |||
1463 | res = d_add_unique(dentry, inode); | 1459 | res = d_add_unique(dentry, inode); |
1464 | nfs_unblock_sillyrename(dentry->d_parent); | 1460 | nfs_unblock_sillyrename(dentry->d_parent); |
1465 | if (res != NULL) { | 1461 | if (res != NULL) { |
1466 | dput(ctx->path.dentry); | 1462 | dput(ctx->dentry); |
1467 | ctx->path.dentry = dget(res); | 1463 | ctx->dentry = dget(res); |
1468 | dentry = res; | 1464 | dentry = res; |
1469 | } | 1465 | } |
1470 | err = nfs_intent_set_file(nd, ctx); | 1466 | err = nfs_intent_set_file(nd, ctx); |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 8eea25366717..b35d25b98da6 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -284,7 +284,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq, | |||
284 | loff_t pos) | 284 | loff_t pos) |
285 | { | 285 | { |
286 | struct nfs_open_context *ctx = dreq->ctx; | 286 | struct nfs_open_context *ctx = dreq->ctx; |
287 | struct inode *inode = ctx->path.dentry->d_inode; | 287 | struct inode *inode = ctx->dentry->d_inode; |
288 | unsigned long user_addr = (unsigned long)iov->iov_base; | 288 | unsigned long user_addr = (unsigned long)iov->iov_base; |
289 | size_t count = iov->iov_len; | 289 | size_t count = iov->iov_len; |
290 | size_t rsize = NFS_SERVER(inode)->rsize; | 290 | size_t rsize = NFS_SERVER(inode)->rsize; |
@@ -715,7 +715,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq, | |||
715 | loff_t pos, int sync) | 715 | loff_t pos, int sync) |
716 | { | 716 | { |
717 | struct nfs_open_context *ctx = dreq->ctx; | 717 | struct nfs_open_context *ctx = dreq->ctx; |
718 | struct inode *inode = ctx->path.dentry->d_inode; | 718 | struct inode *inode = ctx->dentry->d_inode; |
719 | unsigned long user_addr = (unsigned long)iov->iov_base; | 719 | unsigned long user_addr = (unsigned long)iov->iov_base; |
720 | size_t count = iov->iov_len; | 720 | size_t count = iov->iov_len; |
721 | struct rpc_task *task; | 721 | struct rpc_task *task; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 6f4850deb272..fe1203797b2b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -567,7 +567,7 @@ static struct nfs_lock_context *__nfs_find_lock_context(struct nfs_open_context | |||
567 | struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx) | 567 | struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx) |
568 | { | 568 | { |
569 | struct nfs_lock_context *res, *new = NULL; | 569 | struct nfs_lock_context *res, *new = NULL; |
570 | struct inode *inode = ctx->path.dentry->d_inode; | 570 | struct inode *inode = ctx->dentry->d_inode; |
571 | 571 | ||
572 | spin_lock(&inode->i_lock); | 572 | spin_lock(&inode->i_lock); |
573 | res = __nfs_find_lock_context(ctx); | 573 | res = __nfs_find_lock_context(ctx); |
@@ -594,7 +594,7 @@ struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx) | |||
594 | void nfs_put_lock_context(struct nfs_lock_context *l_ctx) | 594 | void nfs_put_lock_context(struct nfs_lock_context *l_ctx) |
595 | { | 595 | { |
596 | struct nfs_open_context *ctx = l_ctx->open_context; | 596 | struct nfs_open_context *ctx = l_ctx->open_context; |
597 | struct inode *inode = ctx->path.dentry->d_inode; | 597 | struct inode *inode = ctx->dentry->d_inode; |
598 | 598 | ||
599 | if (!atomic_dec_and_lock(&l_ctx->count, &inode->i_lock)) | 599 | if (!atomic_dec_and_lock(&l_ctx->count, &inode->i_lock)) |
600 | return; | 600 | return; |
@@ -620,7 +620,7 @@ void nfs_close_context(struct nfs_open_context *ctx, int is_sync) | |||
620 | return; | 620 | return; |
621 | if (!is_sync) | 621 | if (!is_sync) |
622 | return; | 622 | return; |
623 | inode = ctx->path.dentry->d_inode; | 623 | inode = ctx->dentry->d_inode; |
624 | if (!list_empty(&NFS_I(inode)->open_files)) | 624 | if (!list_empty(&NFS_I(inode)->open_files)) |
625 | return; | 625 | return; |
626 | server = NFS_SERVER(inode); | 626 | server = NFS_SERVER(inode); |
@@ -629,14 +629,14 @@ void nfs_close_context(struct nfs_open_context *ctx, int is_sync) | |||
629 | nfs_revalidate_inode(server, inode); | 629 | nfs_revalidate_inode(server, inode); |
630 | } | 630 | } |
631 | 631 | ||
632 | struct nfs_open_context *alloc_nfs_open_context(struct path *path, struct rpc_cred *cred, fmode_t f_mode) | 632 | struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred, fmode_t f_mode) |
633 | { | 633 | { |
634 | struct nfs_open_context *ctx; | 634 | struct nfs_open_context *ctx; |
635 | 635 | ||
636 | ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); | 636 | ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); |
637 | if (ctx != NULL) { | 637 | if (ctx != NULL) { |
638 | ctx->path = *path; | 638 | nfs_sb_active(dentry->d_sb); |
639 | path_get(&ctx->path); | 639 | ctx->dentry = dget(dentry); |
640 | ctx->cred = get_rpccred(cred); | 640 | ctx->cred = get_rpccred(cred); |
641 | ctx->state = NULL; | 641 | ctx->state = NULL; |
642 | ctx->mode = f_mode; | 642 | ctx->mode = f_mode; |
@@ -658,7 +658,8 @@ struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx) | |||
658 | 658 | ||
659 | static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync) | 659 | static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync) |
660 | { | 660 | { |
661 | struct inode *inode = ctx->path.dentry->d_inode; | 661 | struct inode *inode = ctx->dentry->d_inode; |
662 | struct super_block *sb = ctx->dentry->d_sb; | ||
662 | 663 | ||
663 | if (!list_empty(&ctx->list)) { | 664 | if (!list_empty(&ctx->list)) { |
664 | if (!atomic_dec_and_lock(&ctx->lock_context.count, &inode->i_lock)) | 665 | if (!atomic_dec_and_lock(&ctx->lock_context.count, &inode->i_lock)) |
@@ -671,7 +672,8 @@ static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync) | |||
671 | NFS_PROTO(inode)->close_context(ctx, is_sync); | 672 | NFS_PROTO(inode)->close_context(ctx, is_sync); |
672 | if (ctx->cred != NULL) | 673 | if (ctx->cred != NULL) |
673 | put_rpccred(ctx->cred); | 674 | put_rpccred(ctx->cred); |
674 | path_put(&ctx->path); | 675 | dput(ctx->dentry); |
676 | nfs_sb_deactive(sb); | ||
675 | kfree(ctx); | 677 | kfree(ctx); |
676 | } | 678 | } |
677 | 679 | ||
@@ -741,7 +743,7 @@ int nfs_open(struct inode *inode, struct file *filp) | |||
741 | cred = rpc_lookup_cred(); | 743 | cred = rpc_lookup_cred(); |
742 | if (IS_ERR(cred)) | 744 | if (IS_ERR(cred)) |
743 | return PTR_ERR(cred); | 745 | return PTR_ERR(cred); |
744 | ctx = alloc_nfs_open_context(&filp->f_path, cred, filp->f_mode); | 746 | ctx = alloc_nfs_open_context(filp->f_path.dentry, cred, filp->f_mode); |
745 | put_rpccred(cred); | 747 | put_rpccred(cred); |
746 | if (ctx == NULL) | 748 | if (ctx == NULL) |
747 | return -ENOMEM; | 749 | return -ENOMEM; |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index aef22fa0a1c0..26bece8f3083 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1132,7 +1132,7 @@ static struct nfs4_opendata *nfs4_open_recoverdata_alloc(struct nfs_open_context | |||
1132 | { | 1132 | { |
1133 | struct nfs4_opendata *opendata; | 1133 | struct nfs4_opendata *opendata; |
1134 | 1134 | ||
1135 | opendata = nfs4_opendata_alloc(ctx->path.dentry, state->owner, 0, 0, NULL, GFP_NOFS); | 1135 | opendata = nfs4_opendata_alloc(ctx->dentry, state->owner, 0, 0, NULL, GFP_NOFS); |
1136 | if (opendata == NULL) | 1136 | if (opendata == NULL) |
1137 | return ERR_PTR(-ENOMEM); | 1137 | return ERR_PTR(-ENOMEM); |
1138 | opendata->state = state; | 1138 | opendata->state = state; |
@@ -1650,7 +1650,7 @@ static int _nfs4_open_expired(struct nfs_open_context *ctx, struct nfs4_state *s | |||
1650 | return PTR_ERR(opendata); | 1650 | return PTR_ERR(opendata); |
1651 | ret = nfs4_open_recover(opendata, state); | 1651 | ret = nfs4_open_recover(opendata, state); |
1652 | if (ret == -ESTALE) | 1652 | if (ret == -ESTALE) |
1653 | d_drop(ctx->path.dentry); | 1653 | d_drop(ctx->dentry); |
1654 | nfs4_opendata_put(opendata); | 1654 | nfs4_opendata_put(opendata); |
1655 | return ret; | 1655 | return ret; |
1656 | } | 1656 | } |
@@ -2081,7 +2081,7 @@ nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx, int open_flags | |||
2081 | struct nfs4_state *state; | 2081 | struct nfs4_state *state; |
2082 | 2082 | ||
2083 | /* Protect against concurrent sillydeletes */ | 2083 | /* Protect against concurrent sillydeletes */ |
2084 | state = nfs4_do_open(dir, ctx->path.dentry, ctx->mode, open_flags, attr, ctx->cred); | 2084 | state = nfs4_do_open(dir, ctx->dentry, ctx->mode, open_flags, attr, ctx->cred); |
2085 | if (IS_ERR(state)) | 2085 | if (IS_ERR(state)) |
2086 | return ERR_CAST(state); | 2086 | return ERR_CAST(state); |
2087 | ctx->state = state; | 2087 | ctx->state = state; |
@@ -2625,7 +2625,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
2625 | 2625 | ||
2626 | if (ctx != NULL) { | 2626 | if (ctx != NULL) { |
2627 | cred = ctx->cred; | 2627 | cred = ctx->cred; |
2628 | de = ctx->path.dentry; | 2628 | de = ctx->dentry; |
2629 | fmode = ctx->mode; | 2629 | fmode = ctx->mode; |
2630 | } | 2630 | } |
2631 | sattr->ia_mode &= ~current_umask(); | 2631 | sattr->ia_mode &= ~current_umask(); |
@@ -4292,7 +4292,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) | |||
4292 | memcpy(data->lsp->ls_stateid.data, data->res.stateid.data, | 4292 | memcpy(data->lsp->ls_stateid.data, data->res.stateid.data, |
4293 | sizeof(data->lsp->ls_stateid.data)); | 4293 | sizeof(data->lsp->ls_stateid.data)); |
4294 | data->lsp->ls_flags |= NFS_LOCK_INITIALIZED; | 4294 | data->lsp->ls_flags |= NFS_LOCK_INITIALIZED; |
4295 | renew_lease(NFS_SERVER(data->ctx->path.dentry->d_inode), data->timestamp); | 4295 | renew_lease(NFS_SERVER(data->ctx->dentry->d_inode), data->timestamp); |
4296 | } | 4296 | } |
4297 | out: | 4297 | out: |
4298 | dprintk("%s: done, ret = %d!\n", __func__, data->rpc_status); | 4298 | dprintk("%s: done, ret = %d!\n", __func__, data->rpc_status); |
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 009855716286..18449f43c568 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -114,7 +114,7 @@ int nfs_set_page_tag_locked(struct nfs_page *req) | |||
114 | if (!nfs_lock_request_dontget(req)) | 114 | if (!nfs_lock_request_dontget(req)) |
115 | return 0; | 115 | return 0; |
116 | if (test_bit(PG_MAPPED, &req->wb_flags)) | 116 | if (test_bit(PG_MAPPED, &req->wb_flags)) |
117 | radix_tree_tag_set(&NFS_I(req->wb_context->path.dentry->d_inode)->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED); | 117 | radix_tree_tag_set(&NFS_I(req->wb_context->dentry->d_inode)->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED); |
118 | return 1; | 118 | return 1; |
119 | } | 119 | } |
120 | 120 | ||
@@ -124,7 +124,7 @@ int nfs_set_page_tag_locked(struct nfs_page *req) | |||
124 | void nfs_clear_page_tag_locked(struct nfs_page *req) | 124 | void nfs_clear_page_tag_locked(struct nfs_page *req) |
125 | { | 125 | { |
126 | if (test_bit(PG_MAPPED, &req->wb_flags)) { | 126 | if (test_bit(PG_MAPPED, &req->wb_flags)) { |
127 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 127 | struct inode *inode = req->wb_context->dentry->d_inode; |
128 | struct nfs_inode *nfsi = NFS_I(inode); | 128 | struct nfs_inode *nfsi = NFS_I(inode); |
129 | 129 | ||
130 | spin_lock(&inode->i_lock); | 130 | spin_lock(&inode->i_lock); |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 20a7f952e244..a68679f538fc 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -144,7 +144,7 @@ int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, | |||
144 | 144 | ||
145 | static void nfs_readpage_release(struct nfs_page *req) | 145 | static void nfs_readpage_release(struct nfs_page *req) |
146 | { | 146 | { |
147 | struct inode *d_inode = req->wb_context->path.dentry->d_inode; | 147 | struct inode *d_inode = req->wb_context->dentry->d_inode; |
148 | 148 | ||
149 | if (PageUptodate(req->wb_page)) | 149 | if (PageUptodate(req->wb_page)) |
150 | nfs_readpage_to_fscache(d_inode, req->wb_page, 0); | 150 | nfs_readpage_to_fscache(d_inode, req->wb_page, 0); |
@@ -152,8 +152,8 @@ static void nfs_readpage_release(struct nfs_page *req) | |||
152 | unlock_page(req->wb_page); | 152 | unlock_page(req->wb_page); |
153 | 153 | ||
154 | dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", | 154 | dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", |
155 | req->wb_context->path.dentry->d_inode->i_sb->s_id, | 155 | req->wb_context->dentry->d_inode->i_sb->s_id, |
156 | (long long)NFS_FILEID(req->wb_context->path.dentry->d_inode), | 156 | (long long)NFS_FILEID(req->wb_context->dentry->d_inode), |
157 | req->wb_bytes, | 157 | req->wb_bytes, |
158 | (long long)req_offset(req)); | 158 | (long long)req_offset(req)); |
159 | nfs_release_request(req); | 159 | nfs_release_request(req); |
@@ -207,7 +207,7 @@ static int nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data, | |||
207 | unsigned int count, unsigned int offset, | 207 | unsigned int count, unsigned int offset, |
208 | struct pnfs_layout_segment *lseg) | 208 | struct pnfs_layout_segment *lseg) |
209 | { | 209 | { |
210 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 210 | struct inode *inode = req->wb_context->dentry->d_inode; |
211 | 211 | ||
212 | data->req = req; | 212 | data->req = req; |
213 | data->inode = inode; | 213 | data->inode = inode; |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 727168059684..08579312c57b 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -409,7 +409,7 @@ out: | |||
409 | */ | 409 | */ |
410 | static void nfs_inode_remove_request(struct nfs_page *req) | 410 | static void nfs_inode_remove_request(struct nfs_page *req) |
411 | { | 411 | { |
412 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 412 | struct inode *inode = req->wb_context->dentry->d_inode; |
413 | struct nfs_inode *nfsi = NFS_I(inode); | 413 | struct nfs_inode *nfsi = NFS_I(inode); |
414 | 414 | ||
415 | BUG_ON (!NFS_WBACK_BUSY(req)); | 415 | BUG_ON (!NFS_WBACK_BUSY(req)); |
@@ -438,7 +438,7 @@ nfs_mark_request_dirty(struct nfs_page *req) | |||
438 | static void | 438 | static void |
439 | nfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg) | 439 | nfs_mark_request_commit(struct nfs_page *req, struct pnfs_layout_segment *lseg) |
440 | { | 440 | { |
441 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 441 | struct inode *inode = req->wb_context->dentry->d_inode; |
442 | struct nfs_inode *nfsi = NFS_I(inode); | 442 | struct nfs_inode *nfsi = NFS_I(inode); |
443 | 443 | ||
444 | spin_lock(&inode->i_lock); | 444 | spin_lock(&inode->i_lock); |
@@ -852,13 +852,13 @@ static int nfs_write_rpcsetup(struct nfs_page *req, | |||
852 | struct pnfs_layout_segment *lseg, | 852 | struct pnfs_layout_segment *lseg, |
853 | int how) | 853 | int how) |
854 | { | 854 | { |
855 | struct inode *inode = req->wb_context->path.dentry->d_inode; | 855 | struct inode *inode = req->wb_context->dentry->d_inode; |
856 | 856 | ||
857 | /* Set up the RPC argument and reply structs | 857 | /* Set up the RPC argument and reply structs |
858 | * NB: take care not to mess about with data->commit et al. */ | 858 | * NB: take care not to mess about with data->commit et al. */ |
859 | 859 | ||
860 | data->req = req; | 860 | data->req = req; |
861 | data->inode = inode = req->wb_context->path.dentry->d_inode; | 861 | data->inode = inode = req->wb_context->dentry->d_inode; |
862 | data->cred = req->wb_context->cred; | 862 | data->cred = req->wb_context->cred; |
863 | data->lseg = get_lseg(lseg); | 863 | data->lseg = get_lseg(lseg); |
864 | 864 | ||
@@ -1053,9 +1053,9 @@ static void nfs_writeback_done_partial(struct rpc_task *task, void *calldata) | |||
1053 | 1053 | ||
1054 | dprintk("NFS: %5u write(%s/%lld %d@%lld)", | 1054 | dprintk("NFS: %5u write(%s/%lld %d@%lld)", |
1055 | task->tk_pid, | 1055 | task->tk_pid, |
1056 | data->req->wb_context->path.dentry->d_inode->i_sb->s_id, | 1056 | data->req->wb_context->dentry->d_inode->i_sb->s_id, |
1057 | (long long) | 1057 | (long long) |
1058 | NFS_FILEID(data->req->wb_context->path.dentry->d_inode), | 1058 | NFS_FILEID(data->req->wb_context->dentry->d_inode), |
1059 | data->req->wb_bytes, (long long)req_offset(data->req)); | 1059 | data->req->wb_bytes, (long long)req_offset(data->req)); |
1060 | 1060 | ||
1061 | nfs_writeback_done(task, data); | 1061 | nfs_writeback_done(task, data); |
@@ -1148,8 +1148,8 @@ static void nfs_writeback_release_full(void *calldata) | |||
1148 | 1148 | ||
1149 | dprintk("NFS: %5u write (%s/%lld %d@%lld)", | 1149 | dprintk("NFS: %5u write (%s/%lld %d@%lld)", |
1150 | data->task.tk_pid, | 1150 | data->task.tk_pid, |
1151 | req->wb_context->path.dentry->d_inode->i_sb->s_id, | 1151 | req->wb_context->dentry->d_inode->i_sb->s_id, |
1152 | (long long)NFS_FILEID(req->wb_context->path.dentry->d_inode), | 1152 | (long long)NFS_FILEID(req->wb_context->dentry->d_inode), |
1153 | req->wb_bytes, | 1153 | req->wb_bytes, |
1154 | (long long)req_offset(req)); | 1154 | (long long)req_offset(req)); |
1155 | 1155 | ||
@@ -1347,7 +1347,7 @@ void nfs_init_commit(struct nfs_write_data *data, | |||
1347 | struct pnfs_layout_segment *lseg) | 1347 | struct pnfs_layout_segment *lseg) |
1348 | { | 1348 | { |
1349 | struct nfs_page *first = nfs_list_entry(head->next); | 1349 | struct nfs_page *first = nfs_list_entry(head->next); |
1350 | struct inode *inode = first->wb_context->path.dentry->d_inode; | 1350 | struct inode *inode = first->wb_context->dentry->d_inode; |
1351 | 1351 | ||
1352 | /* Set up the RPC argument and reply structs | 1352 | /* Set up the RPC argument and reply structs |
1353 | * NB: take care not to mess about with data->commit et al. */ | 1353 | * NB: take care not to mess about with data->commit et al. */ |
@@ -1435,8 +1435,8 @@ void nfs_commit_release_pages(struct nfs_write_data *data) | |||
1435 | nfs_clear_request_commit(req); | 1435 | nfs_clear_request_commit(req); |
1436 | 1436 | ||
1437 | dprintk("NFS: commit (%s/%lld %d@%lld)", | 1437 | dprintk("NFS: commit (%s/%lld %d@%lld)", |
1438 | req->wb_context->path.dentry->d_inode->i_sb->s_id, | 1438 | req->wb_context->dentry->d_sb->s_id, |
1439 | (long long)NFS_FILEID(req->wb_context->path.dentry->d_inode), | 1439 | (long long)NFS_FILEID(req->wb_context->dentry->d_inode), |
1440 | req->wb_bytes, | 1440 | req->wb_bytes, |
1441 | (long long)req_offset(req)); | 1441 | (long long)req_offset(req)); |
1442 | if (status < 0) { | 1442 | if (status < 0) { |