[GFS2] Fix OOM error handling

Fix the OOM error handling in inode.c where it was possible for
a NULL pointer to be dereferenced.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

+3
+3
fs/gfs2/inode.c
··· 157 157 struct gfs2_glock *io_gl; 158 158 int error; 159 159 160 + if (!inode) 161 + return ERR_PTR(-ENOBUFS); 162 + 160 163 if (inode->i_state & I_NEW) { 161 164 struct gfs2_sbd *sdp = GFS2_SB(inode); 162 165 umode_t mode = DT2IF(type);