aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-10-01 12:58:25 -0400
committerTom Haynes <loghyr@primarydata.com>2015-02-03 14:06:46 -0500
commit80c76fe314c2859d5aac94b5d66d2b9895aa73d4 (patch)
treed816f0646dda34dabf183fe1f61954dba340d1be /fs/nfs
parent0a00b77b331a0e4aac461d4e920677661256918a (diff)
pnfs: fail comparison when bucket verifier not set
This skips the WARN_ON_ONCE, but doesnt change behavior (the memcmp would fail). Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 651387bbfd9f..eb814789f700 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -222,7 +222,11 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq,
222 222
223 verfp = nfs_direct_select_verf(dreq, data->ds_clp, 223 verfp = nfs_direct_select_verf(dreq, data->ds_clp,
224 data->ds_commit_index); 224 data->ds_commit_index);
225 WARN_ON_ONCE(verfp->committed < 0); 225
226 /* verifier not set so always fail */
227 if (verfp->committed < 0)
228 return 1;
229
226 return memcmp(verfp, &data->verf, sizeof(struct nfs_writeverf)); 230 return memcmp(verfp, &data->verf, sizeof(struct nfs_writeverf));
227} 231}
228 232