Unverified Commit 195117a2 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1136 gfs2: Don't deref jdesc in evict

parents 02df2e99 a1816ee0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1412,6 +1412,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;

	gfs2_holder_mark_uninitialized(&gh);
	ret = evict_should_delete(inode, &gh);
	if (ret == SHOULD_DEFER_EVICTION)