Skip to content

Commit

Permalink
xfs: use hlist_add_fake
Browse files Browse the repository at this point in the history
XFS does not need it's inodes to actuall be hashed in the VFS inode
cache, but we require the inode to be marked hashed for the
writeback code to work.

Insted of using insert_inode_hash, which requires a second
inode_lock roundtrip after the partial merge of the inode
scalability patches in 2.6.37-rc simply use the new hlist_add_fake
helper to mark it hashed without requiring a lock or touching a
global cache line.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Nov 10, 2010
1 parent 5d2bf8a commit c6f6cd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/linux-2.6/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,8 @@ xfs_setup_inode(
inode->i_state = I_NEW;

inode_sb_list_add(inode);
insert_inode_hash(inode);
/* make the inode look hashed for the writeback code */
hlist_add_fake(&inode->i_hash);

inode->i_mode = ip->i_d.di_mode;
inode->i_nlink = ip->i_d.di_nlink;
Expand Down

0 comments on commit c6f6cd0

Please sign in to comment.