3.10-stable review patch. If anyone has any objections, please let me know.
------------------ From: Zheng Liu <wenqing...@taobao.com> commit 30d29b119ef01776e0a301444ab24defe8d8bef3 upstream. In swap_inode_boot_loader() we forgot to release ->i_mutex and resume unlocked dio for inode and inode_bl if there is an error starting the journal handle. This commit fixes this issue. Reported-by: Ahmed Tamrawi <ahmedtamr...@gmail.com> Cc: Andreas Dilger <adilger.ker...@dilger.ca> Cc: Dr. Tilmann Bubeck <t.bub...@reinform.de> Signed-off-by: Zheng Liu <wenqing...@taobao.com> Signed-off-by: "Theodore Ts'o" <ty...@mit.edu> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- fs/ext4/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -145,7 +145,7 @@ static long swap_inode_boot_loader(struc handle = ext4_journal_start(inode_bl, EXT4_HT_MOVE_EXTENTS, 2); if (IS_ERR(handle)) { err = -EINVAL; - goto swap_boot_out; + goto journal_err_out; } /* Protect extent tree against block allocations via delalloc */ @@ -203,6 +203,7 @@ static long swap_inode_boot_loader(struc ext4_double_up_write_data_sem(inode, inode_bl); +journal_err_out: ext4_inode_resume_unlocked_dio(inode); ext4_inode_resume_unlocked_dio(inode_bl); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/