lkml.org 
[lkml]   [2005]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 12/12] dlm: fix device refcount
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);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-15 12:43    [W:0.019 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site