ocfs2-add-journal-null-check-in-ocfs2_checkpoint_inode.patch removed from -mm tree
The quilt patch titled
Subject: ocfs2: add journal NULL check in ocfs2_checkpoint_inode()
has been removed from the -mm tree. Its filename was
ocfs2-add-journal-null-check-in-ocfs2_checkpoint_inode.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Joseph Qi <[email protected]>
Subject: ocfs2: add journal NULL check in ocfs2_checkpoint_inode()
Date: Sun, 31 May 2026 21:16:45 +0800
During unmount, ocfs2_journal_shutdown() frees the journal and sets osb->journal to NULL. Later, when VFS evicts remaining cached inodes, ocfs2_evict_inode() -> ocfs2_clear_inode() -> ocfs2_checkpoint_inode() -> ocfs2_ci_fully_checkpointed() dereferences osb->journal, causing a NULL pointer dereference.
Fix this by adding a NULL check for osb->journal in ocfs2_checkpoint_inode(). If the journal is NULL, it has already been fully flushed and destroyed during shutdown, so there is nothing to checkpoint.
---
fs/ocfs2/journal.h | 3 +++ 1 file changed, 3 insertions(+)
fs/ocfs2/journal.h renamed from fs/ocfs2/journal.h~ocfs2-add-journal-null-check-in-ocfs2_checkpoint_inode +3 -0
@@ -196,6 +196,9 @@ static inline void ocfs2_checkpoint_inodif (ocfs2_mount_local (osb))return ; +if (!osb->journal) +return ; +if (!ocfs2_ci_fully_checkpointed (INODE_CACHE (inode))) {/* WARNING: This only kicks off a single * checkpoint. If someone races you and adds more
_
Patches currently in -mm which might be from [email protected] are