public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 12/12] dlm: fix device refcount
@ 2005-07-15 10:37 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2005-07-15 10:37 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

[-- Attachment #1: device-refcount.patch --]
[-- Type: text/plain, Size: 787 bytes --]

An extra refcount was being left on devices.

Signed-off-by: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>

Index: linux/drivers/dlm/device.c
===================================================================
--- linux.orig/drivers/dlm/device.c
+++ linux/drivers/dlm/device.c
@@ -449,8 +449,8 @@ static int dlm_open(struct inode *inode,
 	spin_lock_init(&f->fi_ast_lock);
 	init_waitqueue_head(&f->fi_wait);
 	f->fi_ls = lsinfo;
-	atomic_set(&f->fi_refcnt, 1);
 	f->fi_flags = 0;
+	get_file_info(f);
 	set_bit(1, &f->fi_flags);
 
 	file->private_data = f;
@@ -602,6 +602,7 @@ static int dlm_close(struct inode *inode
 		}
 	}
 	up(&user_ls_lock);
+	put_file_info(f);
 
 	/* Restore signals */
 	sigprocmask(SIG_SETMASK, &tmpsig, NULL);

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-15 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15 10:37 [patch 12/12] dlm: fix device refcount David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox