On Tue, Dec 10, 2013 at 11:14:00AM +0100, Jan Kara wrote: > Akira-san has been reporting rare deadlocks of his machine when running > xfstests test 269 on ext4 filesystem. The problem turned out to be in > ext4_da_reserve_metadata() and ext4_da_reserve_space() which called > ext4_should_retry_alloc() while holding i_data_sem. Since > ext4_should_retry_alloc() can force a transaction commit, this is a > lock ordering violation and leads to deadlocks. > > Fix the problem by just removing the retry loops. These functions should > just report ENOSPC to the caller (e.g. ext4_da_write_begin()) and that > function must take care of retrying after dropping all necessary locks. > > Reported-and-tested-by: Akira Fujita <a-fujita@xxxxxxxxxxxxx> > Signed-off-by: Jan Kara <jack@xxxxxxx> Thanks, applied. - Ted -- 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