summaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-11-30 15:15:46 +1100
committerAlex Elder <aelder@sgi.com>2010-12-01 07:40:20 -0600
commitde25c1818c44f580ff556cb9e0f7a1c687ed870b (patch)
treea8fafd9317cf4841b6004119f6e84ddbece73af3 /fs/select.c
parent309c848002052edbec650075a1eb098b17c17f35 (diff)
downloadlinux-de25c1818c44f580ff556cb9e0f7a1c687ed870b.tar.bz2
xfs: avoid moving stale inodes in the AIL
When an inode has been marked stale because the cluster is being freed, we don't want to (re-)insert this inode into the AIL. There is a race condition where the cluster buffer may be unpinned before the inode is inserted into the AIL during transaction committed processing. If the buffer is unpinned before the inode item has been committed and inserted, then it is possible for the buffer to be released and hence processthe stale inode callbacks before the inode is inserted into the AIL. In this case, we then insert a clean, stale inode into the AIL which will never get removed by an IO completion. It will, however, get reclaimed and that triggers an assert in xfs_inode_free() complaining about freeing an inode still in the AIL. This race can be avoided by not moving stale inodes forward in the AIL during transaction commit completion processing. This closes the race condition by ensuring we never insert clean stale inodes into the AIL. It is safe to do this because a dirty stale inode, by definition, must already be in the AIL. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/select.c')
0 files changed, 0 insertions, 0 deletions