aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-03-18 19:45:14 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-03-25 12:04:10 -0400
commitc58c844187df61ef7cc103d0abb5dd6198bcfcd6 (patch)
tree0e435c37318e290346f3bed74bba05350ec4dd2f /fs/nfs/read.c
parent5d422301f97b821301efcdb6fc9d1a83a5c102d6 (diff)
NFS: Don't accept more reads/writes if the open context recovery failed
If the state recovery failed, we want to ensure that the application doesn't try to use the same file descriptor for more reads or writes. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index a5e5d9899d56..70a26c651f09 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -514,6 +514,8 @@ void nfs_read_prepare(struct rpc_task *task, void *calldata)
514{ 514{
515 struct nfs_read_data *data = calldata; 515 struct nfs_read_data *data = calldata;
516 NFS_PROTO(data->header->inode)->read_rpc_prepare(task, data); 516 NFS_PROTO(data->header->inode)->read_rpc_prepare(task, data);
517 if (unlikely(test_bit(NFS_CONTEXT_BAD, &data->args.context->flags)))
518 rpc_exit(task, -EIO);
517} 519}
518 520
519static const struct rpc_call_ops nfs_read_common_ops = { 521static const struct rpc_call_ops nfs_read_common_ops = {