[RFC PATCH] jffs2: fix recursive fs_reclaim deadlock
Qingfang Deng
dqfext at gmail.com
Fri Mar 15 05:19:30 PDT 2024
Hi Zhihao,
On Fri, Mar 15, 2024 at 7:19 PM Zhihao Cheng <chengzhihao1 at huawei.com> wrote:
> I think it's a false positive warning. Jffs2 is trying to get root inode
> in process '#1', which means that the filesystem is not mounted
> yet(Because d_make_root is after jffs2_iget(sb,1), there is no way to
> access other inodes.), so it is impossible that jffs2 inode is being
> evicted in '#0'.
>
You're right that process '#1' is getting the root inode. However,
lockdep only records the stack of the first unique lock ordering (see
https://docs.kernel.org/locking/lockdep-design.html#performance ), and
there are many occasions where GFP_KERNEL is used inside a
jffs2_inode_info::sem 's critical section.
More information about the linux-mtd
mailing list