From: David Teigland <teigland@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch 12/12] dlm: fix device refcount
Date: Fri, 15 Jul 2005 18:37:27 +0800 [thread overview]
Message-ID: <20050715103727.GO17316@redhat.com> (raw)
[-- 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);
--
reply other threads:[~2005-07-15 10:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050715103727.GO17316@redhat.com \
--to=teigland@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox