From: Alex Elder Date: Tue, 11 Jan 2011 03:35:55 +0000 (-0600) Subject: Merge branch 'master' into for-linus-merged X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92f1c008ae79e32b83c0607d184b194f302bb3ee;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'master' into for-linus-merged This merge pulls the XFS master branch into the latest Linus master. This results in a merge conflict whose best fix is not obvious. I manually fixed the conflict, in "fs/xfs/xfs_iget.c". Dave Chinner had done work that resulted in RCU freeing of inodes separate from what Nick Piggin had done, and their results differed slightly in xfs_inode_free(). The fix updates Nick's call_rcu() with the use of VFS_I(), while incorporating needed updates to some XFS inode fields implemented in Dave's series. Dave's RCU callback function has also been removed. Signed-off-by: Alex Elder --- 92f1c008ae79e32b83c0607d184b194f302bb3ee diff --cc fs/xfs/xfs_iget.c index d7de5a3f7867,3ecad00e8409..cb9b6d1469f7 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@@ -145,7 -157,17 +156,18 @@@ xfs_inode_free ASSERT(!spin_is_locked(&ip->i_flags_lock)); ASSERT(completion_done(&ip->i_flush)); - call_rcu(&ip->i_vnode.i_rcu, xfs_inode_free_callback); + /* + * Because we use RCU freeing we need to ensure the inode always + * appears to be reclaimed with an invalid inode number when in the + * free state. The ip->i_flags_lock provides the barrier against lookup + * races. + */ + spin_lock(&ip->i_flags_lock); + ip->i_flags = XFS_IRECLAIM; + ip->i_ino = 0; + spin_unlock(&ip->i_flags_lock); - call_rcu((struct rcu_head *)&VFS_I(ip)->i_dentry, __xfs_inode_free); ++ ++ call_rcu(&VFS_I(ip)->i_rcu, xfs_inode_free_callback); } /*