From: majianpeng <majianpeng@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] vfs: Remove the unnecessary protect.
Date: Tue, 09 Apr 2013 16:06:39 +0800 [thread overview]
Message-ID: <5163CC0F.2000400@gmail.com> (raw)
After allocating a inode,it don't chain in superblock.At this time,it
won't be used by others.So it make no sense to protect there.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
fs/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index f5f7c06..1d7b0dd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -906,9 +906,7 @@ struct inode *new_inode_pseudo(struct super_block *sb)
struct inode *inode = alloc_inode(sb);
if (inode) {
- spin_lock(&inode->i_lock);
inode->i_state = 0;
- spin_unlock(&inode->i_lock);
INIT_LIST_HEAD(&inode->i_sb_list);
}
return inode;
--
1.8.2.rc2.4.g7799588
next reply other threads:[~2013-04-09 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 8:06 majianpeng [this message]
2013-04-15 14:42 ` [PATCH] vfs: Remove the unnecessary protect Jan Kara
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=5163CC0F.2000400@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).