[PATCH] VFS: Fix memory leak with file leases
commitb3834f71cb794d4dba1f9ed2fec8bc7ee2f40b7e
authorJ. Bruce Fields <bfields@fieldses.org>
Fri, 11 Nov 2005 00:08:00 +0000 (10 19:08 -0500)
committerChris Wright <chrisw@osdl.org>
Thu, 24 Nov 2005 22:10:08 +0000 (24 14:10 -0800)
treeb774d90d979af24def0d24eeed20cb807b5a9d3c
parent9761be89f5a057bf2bae57ca98990f89ad5edbe2
[PATCH] VFS: Fix memory leak with file leases

The patch
http://linux.bkbits.net:8080/linux-2.6/diffs/fs/locks.c@1.70??nav=index.html
introduced a pretty nasty memory leak in the lease code. When freeing
the lease, the code in locks_delete_lock() will correctly clean up
the fasync queue, but when we return to fcntl_setlease(), the freed
fasync entry will be reinstated.

This patch ensures that we skip the call to fasync_helper() when we're
freeing up the lease.

Signed-off-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/locks.c