gfs2: Minor gfs2_alloc_inode cleanup
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 24 Jul 2019 11:05:38 +0000 (13:05 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 9 Aug 2019 16:00:52 +0000 (17:00 +0100)
commitd40312598d534c17c17f41c2bb7ce9541a5f786e
tree1000d342c7639188e45a3374392e311404777a84
parent2257e468a63b6d35a77e884ef032c54f9be65c92
gfs2: Minor gfs2_alloc_inode cleanup

In gfs2_alloc_inode, when kmem_cache_alloc cannot allocate a new object, return
NULL immediately.  The code currently relies on the fact that i_inode is the
first member in struct gfs2_inode and so ip and &ip->i_inode evaluate to the
same address, but that isn't immediately obvious.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/super.c