summaryrefslogtreecommitdiffstats
path: root/fs/lockd/svclock.c
diff options
context:
space:
mode:
authorOleg Drokin <Oleg.Drokin@Sun.COM>2008-01-12 03:57:35 +0100
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 22:42:07 +0100
commit54ca95eb362d6988a577965ffb77c08702adb890 (patch)
treea18ff136ce9d530eaa90a42831d9b85a91ab6321 /fs/lockd/svclock.c
parentnfsd4: clean up access_valid, deny_valid checks. (diff)
downloadlinux-54ca95eb362d6988a577965ffb77c08702adb890.tar.xz
linux-54ca95eb362d6988a577965ffb77c08702adb890.zip
Leak in nlmsvc_testlock for async GETFL case
Fix nlm_block leak for the case of supplied blocking lock info. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to '')
-rw-r--r--fs/lockd/svclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 84c4d5e04ebb..2f4d8fa66689 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -505,12 +505,12 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
goto out;
}
if (block->b_flags & B_GOT_CALLBACK) {
+ nlmsvc_unlink_block(block);
if (block->b_fl != NULL
&& block->b_fl->fl_type != F_UNLCK) {
lock->fl = *block->b_fl;
goto conf_lock;
} else {
- nlmsvc_unlink_block(block);
ret = nlm_granted;
goto out;
}