[PATCH] vfs: Remove the unnecessary protect.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux