NFSv4.1/pnfs: Ensure we handle delegation errors in nfs4_proc_layoutget()

nfs4_handle_exception() relies on the caller setting the 'inode' field
in the struct nfs4_exception argument when the error applies to a
delegation.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Trond Myklebust 2016-06-17 16:48:18 -04:00 committed by Anna Schumaker
parent 33688abb28
commit bc23676caf

View File

@ -8036,7 +8036,10 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout, gfp_t gfp_flags)
.flags = RPC_TASK_ASYNC,
};
struct pnfs_layout_segment *lseg = NULL;
struct nfs4_exception exception = { .timeout = *timeout };
struct nfs4_exception exception = {
.inode = inode,
.timeout = *timeout,
};
int status = 0;
dprintk("--> %s\n", __func__);