未验证 提交 b0771f09 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!1146 [sync] PR-1136: gfs2: Don't deref jdesc in evict

Merge Pull Request from: @openeuler-sync-bot 
 

Origin pull request: 
https://gitee.com/openeuler/kernel/pulls/1136 
 
PR sync from: ZhaoLong Wang <wangzhaolong1@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/ID2Q7S2KSELYENBGS2BVZCEVGEP4WKO2/ 
 
 
Link:https://gitee.com/openeuler/kernel/pulls/1146 

Reviewed-by: zhangyi (F) <yi.zhang@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册