]> git.karo-electronics.de Git - karo-tx-linux.git/commit
GFS2: Fix inode allocation error path
authorSteven Whitehouse <swhiteho@redhat.com>
Tue, 2 Aug 2011 12:17:27 +0000 (13:17 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 2 Aug 2011 12:17:27 +0000 (13:17 +0100)
commit7fa8b96476e49843e4e45c85930eb00e58102eb0
treecab0776baf4de43a5196ec6750d84cc1d9f4b69a
parent1070b0852a6c6bd9080bf9d1440d1dc0abc17aa3
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>
fs/gfs2/incore.h
fs/gfs2/inode.c
fs/gfs2/super.c