summaryrefslogtreecommitdiffstats
path: root/fs/nls/nls_cp936.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-05-21 23:46:51 +0200
committerJan Kara <jack@suse.cz>2014-05-22 17:26:11 +0200
commit166418ccefc3cec0e8de54515af826687f036895 (patch)
tree01a801811614e88c600632716746395ceac17b1f /fs/nls/nls_cp936.c
parent22e7478ddbcb670e33fab72d0bbe7c394c3a2c84 (diff)
downloadlinux-166418ccefc3cec0e8de54515af826687f036895.tar.bz2
ext3: Fix deadlock in data=journal mode when fs is frozen
When ext3 is used in data=journal mode, syncing filesystem makes sure all the data is committed in the journal but the data doesn't have to be checkpointed. ext3_freeze() then takes care of checkpointing all the data so all buffer heads are clean but pages can still have dangling dirty bits. So when flusher thread comes later when filesystem is frozen, it tries to write back dirty pages, ext3_journalled_writepage() tries to start a transaction and hangs waiting for frozen fs causing a deadlock because a holder of s_umount semaphore may be waiting for flusher thread to complete. The fix is luckily relatively easy. We don't have to start a transaction in ext3_journalled_writepage() when a page is just dirty (and doesn't have PageChecked set) because in that case all buffers should be already mapped (mapping must happen before writing a buffer to the journal) and it is enough to write them out. This optimization also solves the deadlock because block_write_full_page() will just find out there's no buffer to write and do nothing. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/nls/nls_cp936.c')
0 files changed, 0 insertions, 0 deletions