]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: fix fi_delegees leak when fi_had_conflict returns true
authorJeff Layton <jlayton@primarydata.com>
Sat, 13 Dec 2014 14:11:39 +0000 (09:11 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 7 Jan 2015 18:38:21 +0000 (13:38 -0500)
commit3e33e144b1fbdd585e290cb9b8015af5ed4d5244
tree696ef809d14d51b48112195e06dbf7bd599807c4
parent016bd972173dd45f89745d2c8412fb2b4c30d084
nfsd: fix fi_delegees leak when fi_had_conflict returns true

Currently, nfs4_set_delegation takes a reference to an existing
delegation and then checks to see if there is a conflict. If there is
one, then it doesn't release that reference.

Change the code to take the reference after the check and only if there
is no conflict.

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