diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-28 13:54:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:24 +0200 |
commit | c31ebfa6e16a2daa04e9b8888c2071679aa8256b (patch) | |
tree | 9bf00d8fbc92096c65e2049f95b8eb2f0add7c41 /fs | |
parent | 013e460e7ac688bac81c63671d68d1817a4b17e0 (diff) | |
download | lwn-c31ebfa6e16a2daa04e9b8888c2071679aa8256b.tar.gz lwn-c31ebfa6e16a2daa04e9b8888c2071679aa8256b.zip |
NFS/pnfs: Do not clobber existing pgio_done_cb in nfs4_proc_read_setup
commit ca857cc1d4cf17aba4bbb3b95d35454ad96924b3 upstream.
If a pNFS client sets hdr->pgio_done_cb, then we should not overwrite that
in nfs4_proc_read_setup()
Fixes: 75bf47ebf6b5 ("pNFS/flexfile: Fix erroneous fall back to...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e2320c643107..00fd0c716988 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4393,7 +4393,8 @@ static void nfs4_proc_read_setup(struct nfs_pgio_header *hdr, struct rpc_message *msg) { hdr->timestamp = jiffies; - hdr->pgio_done_cb = nfs4_read_done_cb; + if (!hdr->pgio_done_cb) + hdr->pgio_done_cb = nfs4_read_done_cb; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; nfs4_init_sequence(&hdr->args.seq_args, &hdr->res.seq_res, 0); } |