pnfs: fail comparison when bucket verifier not set
authorWeston Andros Adamson <dros@primarydata.com>
Wed, 1 Oct 2014 16:58:25 +0000 (12:58 -0400)
committerTom Haynes <loghyr@primarydata.com>
Tue, 3 Feb 2015 19:06:46 +0000 (11:06 -0800)
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>
fs/nfs/direct.c

index 651387bbfd9fac670e3f8f0b309046f26e24dd5e..eb814789f7002c0093da740a543e3a2393885fe2 100644 (file)
@@ -222,7 +222,11 @@ static int nfs_direct_cmp_commit_data_verf(struct nfs_direct_req *dreq,
 
        verfp = nfs_direct_select_verf(dreq, data->ds_clp,
                                         data->ds_commit_index);
-       WARN_ON_ONCE(verfp->committed < 0);
+
+       /* verifier not set so always fail */
+       if (verfp->committed < 0)
+               return 1;
+
        return memcmp(verfp, &data->verf, sizeof(struct nfs_writeverf));
 }
 
This page took 0.024849 seconds and 5 git commands to generate.