diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index a971862b186e3f9ed5b4e06586e98d3111d780d5..831dae7a5c39b1658201920152556523c7f8b940 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1583,6 +1583,14 @@ static void gfs2_evict_inode(struct inode *inode) if (inode->i_nlink || sb_rdonly(sb)) goto out; + /* + * In case of an incomplete mount, gfs2_evict_inode() may be called for + * system files without having an active journal to write to. In that + * case, skip the filesystem evict. + */ + if (!sdp->sd_jdesc) + goto out; + if (test_bit(GIF_ALLOC_FAILED, &ip->i_flags)) { BUG_ON(!gfs2_glock_is_locked_by_me(ip->i_gl)); gfs2_holder_mark_uninitialized(&gh);