Fix race when looking up reclaimable inodes
If we get a race looking up a reclaimable inode, we can
end up with the winner proceeding to use the inode before
it has been completely re-initialised. This is a Bad Thing.
Fix the race by checking whether we are still initialising the
inod eonce we have a reference to it, and if so wait for the
initialisation to complete before continuing.
While there, fix a leaked reference count in the same code
when encountering an unlinked inode and we are not doing a
lookup for a create operation.
Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed Oct 29 14:38:57 EST 2008
Inspected by: lachlan
The following file(s) were checked into:
fs/xfs/xfs_iget.c - 1.256 - changed
fs/xfs/linux-2.6/xfs_linux.h - 1.173 - changed
- Fix race when looking up reclaimable inodes