nfsd4: Fix filp leak
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Mon, 18 Apr 2011 15:48:55 +0000 (11:48 -0400)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:00 +0000 (14:23 -0500)
commit47d0077133e14886231c5e373e7bf42f9e6f2efa
tree5abbdf52b85defaa97fde8493ce37aaf924def17
parentcb73c737103132121c13ba4a8eacf7500f7d60d7
nfsd4: Fix filp leak

BugLink: http://bugs.launchpad.net/bugs/775809

commit a96e5b90804be8b540d30f4a1453fc87f95b3149 upstream.

23fcf2ec93fb8573a653408316af599939ff9a8e (nfsd4: fix oops on lock failure)

The above patch breaks free path for stp->st_file. If stp was inserted
into sop->so_stateids, we have to free stp->st_file refcount. Because
stp->st_file refcount itself is taken whether or not any refcounts are
taken on the stp->st_file->fi_fds[].

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/nfsd/nfs4state.c