Merge tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[cascardo/linux.git] / fs / gfs2 / inode.c
index 72e9c64..21dc784 100644 (file)
@@ -93,12 +93,12 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
        int error;
 
        inode = iget_locked(sb, (unsigned long)no_addr);
-       ip = GFS2_I(inode);
-       ip->i_no_addr = no_addr;
-
        if (!inode)
                return ERR_PTR(-ENOMEM);
 
+       ip = GFS2_I(inode);
+       ip->i_no_addr = no_addr;
+
        if (inode->i_state & I_NEW) {
                struct gfs2_sbd *sdp = GFS2_SB(inode);
                ip->i_no_formal_ino = no_formal_ino;