gfs2: fix an oops in gfs2_permission

In RCU mode, we might race with gfs2_evict_inode(), which zeroes
->i_gl.  Freeing of the object it points to is RCU-delayed, so
if we manage to fetch the pointer before it's been replaced with
NULL, we are fine.  Check if we'd fetched NULL and treat that
as "bail out and tell the caller to get out of RCU mode".

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
Al Viro 2023-10-02 03:33:44 +01:00 • committed by Andreas Gruenbacher
commit 0abd1557e2
2 changed files with 10 additions and 3 deletions