From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs/inode.c list_del_init
Date: Wed, 05 Jun 2002 00:06:26 -0400 [thread overview]
Message-ID: <3CFD8E42.7000703@didntduck.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
A few cases of list_del(x) + INIT_LIST_HEAD(x) crept in recently which
can be replaced with list_del_init(x).
[-- Attachment #2: inode-list-1 --]
[-- Type: text/plain, Size: 974 bytes --]
diff -urN linux-bk/fs/inode.c linux/fs/inode.c
--- linux-bk/fs/inode.c Tue Jun 4 23:54:33 2002
+++ linux/fs/inode.c Tue Jun 4 23:57:37 2002
@@ -390,8 +390,7 @@
if (atomic_read(&inode->i_count))
continue;
list_del(tmp);
- list_del(&inode->i_hash);
- INIT_LIST_HEAD(&inode->i_hash);
+ list_del_init(&inode->i_hash);
list_add(tmp, freeable);
inode->i_state |= I_FREEING;
count++;
@@ -777,8 +776,7 @@
void remove_inode_hash(struct inode *inode)
{
spin_lock(&inode_lock);
- list_del(&inode->i_hash);
- INIT_LIST_HEAD(&inode->i_hash);
+ list_del_init(&inode->i_hash);
spin_unlock(&inode_lock);
}
@@ -786,10 +784,8 @@
{
struct super_operations *op = inode->i_sb->s_op;
- list_del(&inode->i_hash);
- INIT_LIST_HEAD(&inode->i_hash);
- list_del(&inode->i_list);
- INIT_LIST_HEAD(&inode->i_list);
+ list_del_init(&inode->i_hash);
+ list_del_init(&inode->i_list);
inode->i_state|=I_FREEING;
inodes_stat.nr_inodes--;
spin_unlock(&inode_lock);
reply other threads:[~2002-06-05 4:10 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=3CFD8E42.7000703@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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