xfs: fix locking for inode cache radix tree tag updates
authorChristoph Hellwig <hch@infradead.org>
Mon, 1 Mar 2010 11:30:31 +0000 (11:30 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 2 Mar 2010 01:14:36 +0000 (19:14 -0600)
commitf1f724e4b523d444c5a598d74505aefa3d6844d2
tree49408b17a42628b7a0fbc1d5bf163bb716e73545
parenta14a5ab58f9d783ec3a2a287320fab22e1764813
xfs: fix locking for inode cache radix tree tag updates

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>
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/xfs_iget.c