projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
927864c
)
NFSv4.1 Fail data server I/O if stateid represents a lost lock
author
Andy Adamson
<andros@netapp.com>
Tue, 4 Mar 2014 17:31:09 +0000
(12:31 -0500)
committer
Trond Myklebust
<trond.myklebust@primarydata.com>
Wed, 5 Mar 2014 16:55:24 +0000
(11:55 -0500)
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>
fs/nfs/nfs4filelayout.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4filelayout.c
b/fs/nfs/nfs4filelayout.c
index
12c8132
..
b9a35c0
100644
(file)
--- a/
fs/nfs/nfs4filelayout.c
+++ b/
fs/nfs/nfs4filelayout.c
@@
-324,8
+324,9
@@
static void filelayout_read_prepare(struct rpc_task *task, void *data)
&rdata->res.seq_res,
task))
return;
&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)
}
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;
&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)
}
static void filelayout_write_call_done(struct rpc_task *task, void *data)