diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index ec455b92091f..b52ebf8553c2 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1299,6 +1299,10 @@ static int gfs2_ok_to_move(struct gfs2_inode *this, struct gfs2_inode *to) } tmp = gfs2_lookupi(dir, &gfs2_qdotdot, 1); + if (!tmp) { + error = -ENOENT; + break; + } if (IS_ERR(tmp)) { error = PTR_ERR(tmp); break;