Skip to content

Commit

Permalink
pnfs: fail comparison when bucket verifier not set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Weston Andros Adamson authored and Tom Haynes committed Feb 3, 2015
1 parent 0a00b77 commit 80c76fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 80c76fe

Please sign in to comment.