GFS2: Don't dereference inode in gfs2_inode_lookup until it's valid
authorBob Peterson <rpeterso@redhat.com>
Tue, 12 Apr 2016 20:14:26 +0000 (16:14 -0400)
committerBob Peterson <rpeterso@redhat.com>
Thu, 14 Apr 2016 13:52:50 +0000 (09:52 -0400)
commite97321fa095f1ea7110d4d2ba446bd6141ed9a03
treeb14e2f6bf0a670f9378b855f68f5d851b364c8c0
parenta527b38e1475211b67eb59b3fadb40689f035529
GFS2: Don't dereference inode in gfs2_inode_lookup until it's valid

Function gfs2_inode_lookup was dereferencing the inode, and after,
it checks for the value being NULL. We need to check that first.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/inode.c