On 2025/9/30 13:42, Yuezhang Mo wrote:
The commit 168316db3583("dax: assert that i_rwsem is held
exclusive for writes") added lock assertions to ensure proper
locking in DAX operations. However, these assertions trigger
false-positive lockdep warnings since read lock is unnecessary
on read-only filesystems(e.g., erofs).

This patch skips the read lock assertion for read-only filesystems,
eliminating the spurious warnings while maintaining the integrity
checks for writable filesystems.

Fixes: 168316db3583 ("dax: assert that i_rwsem is held exclusive for writes")
Signed-off-by: Yuezhang Mo <[email protected]>
Reviewed-by: Friendy Su <[email protected]>
Reviewed-by: Daniel Palmer <[email protected]>

Reviewed-by: Gao Xiang <[email protected]>

It should also fix:
https://lore.kernel.org/r/[email protected]

Hi Christian and Christoph,
if it looks good to you, could we apply to the vfs tree
for this lockdep warning?

Thanks,
Gao Xiang

Reply via email to