xfs: fix locking for inode cache radix tree tag updates
authorChristoph Hellwig <hch@infradead.org>
Thu, 11 Mar 2010 22:42:17 +0000 (09:42 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:16 +0000 (07:41 -0700)
commit94aa7e9130a50f65acad20f67a872058001361b3
treeb81da76bcd46367907e32a5ca4c97d39c4b3e6c4
parente52af5078f958b84f5ca2f06f692f96438d82d84
xfs: fix locking for inode cache radix tree tag updates

commit f1f724e4b523d444c5a598d74505aefa3d6844d2 upstream

The radix-tree code requires it's users to serialize tag updates
against other updates to the tree.  While XFS protects tag updates
against each other it does not serialize them against updates of the
tree contents, which can lead to tag corruption.  Fix the inode
cache to always take pag_ici_lock in exclusive mode when updating
radix tree tags.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Patrick Schreurs <patrick@news-service.com>
Tested-by: Patrick Schreurs <patrick@news-service.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/xfs_iget.c