From: Oleg Drokin Date: Sat, 12 Jan 2008 02:57:35 +0000 (-0500) Subject: Leak in nlmsvc_testlock for async GETFL case X-Git-Tag: v2.6.25-rc1~1072^2~55 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54ca95eb362d6988a577965ffb77c08702adb890;p=linux-2.6 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 Signed-off-by: J. Bruce Fields --- diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 84c4d5e04e..2f4d8fa666 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; }