From: Trond Myklebust Date: Wed, 30 May 2007 16:58:00 +0000 (-0400) Subject: NFS: Fix a refcount leakage in O_DIRECT X-Git-Tag: v2.6.22-rc4~85 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4946ffb1860597b187d78d61ac6504177eb0ff8;p=pandora-kernel.git NFS: Fix a refcount leakage in O_DIRECT The current code is leaking a reference to dreq->kref when the calls to nfs_direct_read_schedule() and nfs_direct_write_schedule() return an error. This patch moves the call to kref_put() from nfs_direct_wait() back into nfs_direct_read() and nfs_direct_write() (which are the functions that actually took the reference in the first place) fixing the leak. Thanks to Denis V. Lunev for spotting the bug and proposing the original fix. Acked-by: Denis V. Lunev Acked-by: Chuck Lever Signed-off-by: Trond Myklebust --- Reading git-diff-tree failed