aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index cc7a9064be90..23ecf0334a18 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -490,7 +490,7 @@ void put_nfs_open_context(struct nfs_open_context *ctx)
490 spin_unlock(&inode->i_lock); 490 spin_unlock(&inode->i_lock);
491 } 491 }
492 if (ctx->state != NULL) 492 if (ctx->state != NULL)
493 nfs4_close_state(ctx->state, ctx->mode); 493 nfs4_close_state(&ctx->path, ctx->state, ctx->mode);
494 if (ctx->cred != NULL) 494 if (ctx->cred != NULL)
495 put_rpccred(ctx->cred); 495 put_rpccred(ctx->cred);
496 dput(ctx->path.dentry); 496 dput(ctx->path.dentry);
@@ -1103,27 +1103,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1103 */ 1103 */
1104void nfs4_clear_inode(struct inode *inode) 1104void nfs4_clear_inode(struct inode *inode)
1105{ 1105{
1106 struct nfs_inode *nfsi = NFS_I(inode);
1107
1108 /* If we are holding a delegation, return it! */ 1106 /* If we are holding a delegation, return it! */
1109 nfs_inode_return_delegation(inode); 1107 nfs_inode_return_delegation(inode);
1110 /* First call standard NFS clear_inode() code */ 1108 /* First call standard NFS clear_inode() code */
1111 nfs_clear_inode(inode); 1109 nfs_clear_inode(inode);
1112 /* Now clear out any remaining state */
1113 while (!list_empty(&nfsi->open_states)) {
1114 struct nfs4_state *state;
1115
1116 state = list_entry(nfsi->open_states.next,
1117 struct nfs4_state,
1118 inode_states);
1119 dprintk("%s(%s/%Ld): found unclaimed NFSv4 state %p\n",
1120 __FUNCTION__,
1121 inode->i_sb->s_id,
1122 (long long)NFS_FILEID(inode),
1123 state);
1124 BUG_ON(atomic_read(&state->count) != 1);
1125 nfs4_close_state(state, state->state);
1126 }
1127} 1110}
1128#endif 1111#endif
1129 1112