gfs2: Move variable assignment behind a null pointer check in inode_go_dump

Since commit 27a2660f1e ("gfs2: Dump nrpages for inodes and their
glocks"), inode_go_dump() computes the address of inode within ip before
checking if ip is NULL.  This isn't a bug by itself, but it can give
rise to bugs later.  Avoid that by checking if ip is NULL first.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
Markus Elfring 2023-04-13 20:54:30 +02:00 • committed by Andreas Gruenbacher
commit 55534c094f