Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > d236c5da97a239a1b6991cfba2865b66 > files > 106

cman-2.0.115-68.el5_6.1.src.rpm

From f106b915e18e2323f549fbbf0e956c0ee884fb2e Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Wed, 22 Jul 2009 15:29:53 -0500
Subject: [PATCH] gfs_controld: GETLK should free unused resource

rhbz#513285

If a plock resource does not exist in gfs_controld,
(no posix locks exist on a file), fcntl(GETLK) on that file will
cause the resource to be created, but not removed afterward.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/gfs_controld/plock.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/group/gfs_controld/plock.c b/group/gfs_controld/plock.c
index 34c4c21..b03e77f 100644
--- a/group/gfs_controld/plock.c
+++ b/group/gfs_controld/plock.c
@@ -886,6 +886,7 @@ static void do_get(struct mountgroup *mg, struct dlm_plock_info *in,
 		rv = 0;
 
 	write_result(mg, in, rv);
+	put_resource(r);
 }
 
 static void __receive_plock(struct mountgroup *mg, struct dlm_plock_info *in,
-- 
1.5.5.6