summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2022-11-02 17:06:58 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2022-12-02 15:58:00 +0100
commit38552ff676f072e7d15c5e0a877fda613e57ed2d (patch)
tree3bf3437ad5d143178b2348dbbabdc0cd6f3f486c /fs/xfs/xfs_rtalloc.c
parent3d0258bc11185ccb21f922332eca731e1928c5a4 (diff)
gfs2: Fix and clean up create / evict interaction
When gfs2_create_inode() fails after creating a new inode, it uses the GIF_FREE_VFS_INODE and GIF_ALLOC_FAILED inode flags to communicate to gfs2_evict_inode() which parts of the inode need to be deallocated and destroyed. In some error cases, the inode ends up being allocated on disk and then accidentally left behind. In others, the inode is partially constructed and then not properly destroyed. Clean this up by completely handling the inode deallocation and destruction in gfs2_evict_inode(). This means that gfs2_evict_inode() may now be faced with partially constructed inodes, so add the necessary checks to cope with that. In particular, make sure that for incompletely constructed inodes, we're not accessing the buffers backing the on-disk blocks; the contents may be undefined. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
0 files changed, 0 insertions, 0 deletions