Skip to content
Snippets Groups Projects
Commit 09e0834f authored by Akira Fujita's avatar Akira Fujita Committed by Theodore Ts'o
Browse files

ext4: fix deadlock in ext4_ordered_write_end()


If ext4_jbd2_file_inode() in ext4_ordered_write_end() fails for some
reasons, this function returns to caller without unlocking the page.
It leads to the deadlock, and the patch fixes this issue.

Signed-off-by: default avatarAkira Fujita <a-fujita@rs.jp.nec.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent ee90d57e
No related branches found
No related tags found
No related merge requests found
......@@ -959,7 +959,11 @@ static int ext4_ordered_write_end(struct file *file,
ext4_orphan_add(handle, inode);
if (ret2 < 0)
ret = ret2;
} else {
unlock_page(page);
page_cache_release(page);
}
ret2 = ext4_journal_stop(handle);
if (!ret)
ret = ret2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment