mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
NFSv4.1 Fail data server I/O if stateid represents a lost lock
Signed-off-by: Andy Adamson <andros@netapp.com> Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
927864cd92
commit
869a9d375d
1 changed files with 6 additions and 4 deletions
|
@ -324,8 +324,9 @@ static void filelayout_read_prepare(struct rpc_task *task, void *data)
|
|||
&rdata->res.seq_res,
|
||||
task))
|
||||
return;
|
||||
nfs4_set_rw_stateid(&rdata->args.stateid, rdata->args.context,
|
||||
rdata->args.lock_context, FMODE_READ);
|
||||
if (nfs4_set_rw_stateid(&rdata->args.stateid, rdata->args.context,
|
||||
rdata->args.lock_context, FMODE_READ) == -EIO)
|
||||
rpc_exit(task, -EIO); /* lost lock, terminate I/O */
|
||||
}
|
||||
|
||||
static void filelayout_read_call_done(struct rpc_task *task, void *data)
|
||||
|
@ -435,8 +436,9 @@ static void filelayout_write_prepare(struct rpc_task *task, void *data)
|
|||
&wdata->res.seq_res,
|
||||
task))
|
||||
return;
|
||||
nfs4_set_rw_stateid(&wdata->args.stateid, wdata->args.context,
|
||||
wdata->args.lock_context, FMODE_WRITE);
|
||||
if (nfs4_set_rw_stateid(&wdata->args.stateid, wdata->args.context,
|
||||
wdata->args.lock_context, FMODE_WRITE) == -EIO)
|
||||
rpc_exit(task, -EIO); /* lost lock, terminate I/O */
|
||||
}
|
||||
|
||||
static void filelayout_write_call_done(struct rpc_task *task, void *data)
|
||||
|
|
Loading…
Reference in a new issue