Unverified Commit 154d1e7a authored by Yuezhang Mo's avatar Yuezhang Mo Committed by Christian Brauner
Browse files

dax: skip read lock assertion for read-only filesystems



The commit 168316db("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: 168316db ("dax: assert that i_rwsem is held exclusive for writes")
Signed-off-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: default avatarFriendy Su <friendy.su@sony.com>
Reviewed-by: default avatarDaniel Palmer <daniel.palmer@sony.com>
Reviewed-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent d68a29a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment