Re: [PATCH] ocfs2: fix deadlock in dio write orphan cleanup path
Deepanshu Kartikey <[email protected]> Sun, 21 Jun 2026 04:56:26 +0530
| Newsgroups | dev.linux.lists.ocfs2-devel,dev.linux.lists.linux-rt-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CADhLXY51V2kQqKefy-VgUayYBCHcyk8vPTCq8DWCDgVS_cG3oA@mail.gmail.com> |
On Sat, Jun 20, 2026 at 11:29 PM Matthew Wilcox <[email protected]> wrote: > > This seems like a false positive. You can't call write_iter() on > a directory, and orphan_dir is always a directory. > > I would suggest that the easiest way to make this warning go away is to > replace inode_lock(orphan_dir) with inode_lock_nested(orphan_dir, > I_MUTEX_NONDIR2). It's a bit quirky because, well, orphan2 is a > directory. We could add a seventh lock class to > inode_i_mutex_lock_class, but that feels a bit excessive. > Thanks for the review. I have sent the patch v2 with inode_lock_nested(orphan_dir_inode, I_MUTEX_NONDIR2)