]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:48:02 +0000 (07:48 -0700)
commit87bcb4b15d9443cf9a12943fb9162e53ac045b55
tree80a5b56caeffb1d3e01c798ecac8e9ab6ca03d17
parent30cd163f7c089175033d643bcd475c552926fbbf
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>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/xfs_iget.c