nfsd: correctly decrement odstate refcount in error path
authorAndrew Elble <aweits@rit.edu>
Fri, 5 Oct 2018 13:32:08 +0000 (09:32 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 29 Oct 2018 20:58:04 +0000 (16:58 -0400)
commitbd8d725078867cda250fe94b9c5a067b4a64ca74
tree4c0f4fa0b06e38c6cbd8ad04f25aa5d5d453daaf
parent3ae2cefb613b00d613677c05ffa384b4f660f468
nfsd: correctly decrement odstate refcount in error path

alloc_init_deleg() both allocates an nfs4_delegation, and
bumps the refcount on odstate. So after this point, we need to
put_clnt_odstate() and nfs4_put_stid() to not leave the odstate
refcount inappropriately bumped.

Signed-off-by: Andrew Elble <aweits@rit.edu>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c