nfsd4: remember to put RW access on stateid destruction
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 27 Jun 2011 20:57:12 +0000 (16:57 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 15 Jul 2011 22:58:49 +0000 (18:58 -0400)
commit499f3edc23ca0431f3a0a6736b3a40944c81bf3b
tree3c07c63facd0387cf921ce56f9062d14c1edacc2
parent17456804546b78a1c13d2b934c8f50bbde141a38
nfsd4: remember to put RW access on stateid destruction

Without this, for example,

open read
open read+write
close

will result in a struct file leak.

Regression from 7d94784293096c0a46897acdb83be5abd9278ece "nfsd4: fix
downgrade/lock logic".

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c