ext4: Fix possible recursive locking warning in EXT4_IOC_MOVE_EXT From: Akira Fujita <a-fujita@xxxxxxxxxxxxx> If kernel configuration related to lock debugging is enabled, we get possible recursive locking warning. Therefore, use down_write_nested() to guarantee the lock order explicitly. This problem has been reported by Brian Rogers before. http://marc.info/?l=linux-ext4&m=125115356928011&w=1 Reported-by: Brian Rogers <brian@xxxxxxxx> Signed-off-by: Akira Fujita <a-fujita@xxxxxxxxxxxxx> --- fs/ext4/move_extent.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index a7410b3..2ca6aa3 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -189,7 +189,7 @@ double_down_write_data_sem(struct inode *orig_inode, struct inode *donor_inode) } down_write(&EXT4_I(first)->i_data_sem); - down_write(&EXT4_I(second)->i_data_sem); + down_write_nested(&EXT4_I(second)->i_data_sem, SINGLE_DEPTH_NESTING); } /** -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html