diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-08-02 13:17:27 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 12:39:23 +0100 |
commit | 40ac218f52aa5cac7dc8082f28b61c8b2b29373c (patch) | |
tree | 34e86173a2554b738f0141a1c38ffc3191d2f228 /fs/gfs2/incore.h | |
parent | 1d4ec642d9f00d4c531b1a4ae0613091ec1f8e9b (diff) | |
download | op-kernel-dev-40ac218f52aa5cac7dc8082f28b61c8b2b29373c.zip op-kernel-dev-40ac218f52aa5cac7dc8082f28b61c8b2b29373c.tar.gz |
GFS2: Fix inode allocation error path
If we have got far enough through the inode allocation code
path that an inode has already been allocated, then we must
call iput to dispose of it, if an error occurs during a
later part of the process. This will always be the final iput
since there will be no other references to the inode.
Unlike when the inode has been unlinked, its block state will
be GFS2_BLKST_INODE rather than GFS2_BLKST_UNLINKED so we need
to skip the test in ->evict_inode() for this one case in order
to ensure that it will be deallocated correctly. This patch adds
a new flag in order to ensure that this will happen correctly.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 892ac37..be5801a 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -267,6 +267,7 @@ struct gfs2_alloc { enum { GIF_INVALID = 0, GIF_QD_LOCKED = 1, + GIF_ALLOC_FAILED = 2, GIF_SW_PAGED = 3, }; |