diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 03:32:43 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-10-30 03:32:43 -0400 |
commit | 6bfb3d065f4c498c17a3a07f3dc08cedff53aff4 (patch) | |
tree | c5c528c77e44584616a175e0dcc89713e7b76d0a /fs/xfs/linux-2.6/xfs_linux.h | |
parent | e0b8e8b65d578f5d5538465dff8392cf02e1cc5d (diff) |
[XFS] 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.
SGI-PV: 987246
SGI-Modid: xfs-linux-melb:xfs-kern:32429a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_linux.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 214717650b23..77d6ddcaf547 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/spinlock.h> | 77 | #include <linux/spinlock.h> |
78 | #include <linux/random.h> | 78 | #include <linux/random.h> |
79 | #include <linux/ctype.h> | 79 | #include <linux/ctype.h> |
80 | #include <linux/writeback.h> | ||
80 | 81 | ||
81 | #include <asm/page.h> | 82 | #include <asm/page.h> |
82 | #include <asm/div64.h> | 83 | #include <asm/div64.h> |