diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 95f171e7e05a..97bacccff579 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1572,6 +1572,15 @@ out_drop: | |||
1572 | return 0; | 1572 | return 0; |
1573 | } | 1573 | } |
1574 | 1574 | ||
1575 | void nfs4_close_context(struct nfs_open_context *ctx, int is_sync) | ||
1576 | { | ||
1577 | if (ctx->state == NULL) | ||
1578 | return; | ||
1579 | if (is_sync) | ||
1580 | nfs4_close_sync(&ctx->path, ctx->state, ctx->mode); | ||
1581 | else | ||
1582 | nfs4_close_state(&ctx->path, ctx->state, ctx->mode); | ||
1583 | } | ||
1575 | 1584 | ||
1576 | static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) | 1585 | static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) |
1577 | { | 1586 | { |
@@ -3776,6 +3785,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = { | |||
3776 | .commit_done = nfs4_commit_done, | 3785 | .commit_done = nfs4_commit_done, |
3777 | .lock = nfs4_proc_lock, | 3786 | .lock = nfs4_proc_lock, |
3778 | .clear_acl_cache = nfs4_zap_acl_attr, | 3787 | .clear_acl_cache = nfs4_zap_acl_attr, |
3788 | .close_context = nfs4_close_context, | ||
3779 | }; | 3789 | }; |
3780 | 3790 | ||
3781 | /* | 3791 | /* |