On Mar 4, 2014, at 12:31, <andros@xxxxxxxxxx> <andros@xxxxxxxxxx> wrote: > From: Andy Adamson <andros@xxxxxxxxxx> > > Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> > --- > fs/nfs/nfs4filelayout.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c > index 12c8132..66da1e4 100644 > --- 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; > - 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)) Shouldn’t this have an '== -EIO’ test, just like the read case? > + rpc_exit(task, -EIO); /* lost lock, terminate I/O */ > } > > static void filelayout_write_call_done(struct rpc_task *task, void *data) > -- > 1.8.3.1 > _________________________________ Trond Myklebust Linux NFS client maintainer, PrimaryData trond.myklebust@xxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html