Skip to contentSkip to conversation

dlm: fix device refcount

PATCH New David Teigland 1 participant 1 message Jul 15, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 12/12 dlm: fix device refcount

An extra refcount was being left on devices.

drivers/dlm/device.c +2 -1
Index: 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);

--