• Dmitry Monakhov's avatar
    jbd2: use GFP_NOFS in jbd2_cleanup_journal_tail() · f8745bce
    Dmitry Monakhov authored
    commit b4f1afcd upstream.
    
    jbd2_cleanup_journal_tail() can be invoked by jbd2__journal_start()
    So allocations should be done with GFP_NOFS
    
    [Full stack trace snipped from 3.10-rh7]
    [<ffffffff815c4bd4>] dump_stack+0x19/0x1b
    [<ffffffff8105dba1>] warn_slowpath_common+0x61/0x80
    [<ffffffff8105dcca>] warn_slowpath_null+0x1a/0x20
    [<ffffffff815c2142>] slab_pre_alloc_hook.isra.31.part.32+0x15/0x17
    [<ffffffff8119c045>] kmem_cache_alloc+0x55/0x210
    [<ffffffff811477f5>] ? mempool_alloc_slab+0x15/0x20
    [<ffffffff811477f5>] mempool_alloc_slab+0x15/0x20
    [<ffffffff81147939>] mempool_alloc+0x69/0x170
    [<ffffffff815cb69e>] ? _raw_spin_unlock_irq+0xe/0x20
    [<ffffffff8109160d>] ? finish_task_switch+0x5d/0x150
    [<ffffffff811f1a8e>] bio_alloc_bioset+0x1be/0x2e0
    [<ffffffff8127ee49>] blkdev_issue_flush+0x99/0x120
    [<ffffffffa019a733>] jbd2_cleanup_journal_tail+0x93/0xa0 [jbd2] -->GFP_KERNEL
    [<ffffffffa019aca1>] jbd2_log_do_checkpoint+0x221/0x4a0 [jbd2]
    [<ffffffffa019afc7>] __jbd2_log_wait_for_space+0xa7/0x1e0 [jbd2]
    [<ffffffffa01952d8>] start_this_handle+0x2d8/0x550 [jbd2]
    [<ffffffff811b02a9>] ? __memcg_kmem_put_cache+0x29/0x30
    [<ffffffff8119c120>] ? kmem_cache_alloc+0x130/0x210
    [<ffffffffa019573a>] jbd2__journal_start+0xba/0x190 [jbd2]
    [<ffffffff811532ce>] ? lru_cache_add+0xe/0x10
    [<ffffffffa01c9549>] ? ext4_da_write_begin+0xf9/0x330 [ext4]
    [<ffffffffa01f2c77>] __ext4_journal_start_sb+0x77/0x160 [ext4]
    [<ffffffffa01c9549>] ext4_da_write_begin+0xf9/0x330 [ext4]
    [<ffffffff811446ec>] generic_file_buffered_write_iter+0x10c/0x270
    [<ffffffff81146918>] __generic_file_write_iter+0x178/0x390
    [<ffffffff81146c6b>] __generic_file_aio_write+0x8b/0xb0
    [<ffffffff81146ced>] generic_file_aio_write+0x5d/0xc0
    [<ffffffffa01bf289>] ext4_file_write+0xa9/0x450 [ext4]
    [<ffffffff811c31d9>] ? pipe_read+0x379/0x4f0
    [<ffffffff811b93f0>] do_sync_write+0x90/0xe0
    [<ffffffff811b9b6d>] vfs_write+0xbd/0x1e0
    [<ffffffff811ba5b8>] SyS_write+0x58/0xb0
    [<ffffffff815d4799>] system_call_fastpath+0x16/0x1b
    Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    f8745bce
checkpoint.c 20 KB