jbd2: use GFP_NOFS for blkdev_issue_flush
authorShaohua Li <shli@kernel.org>
Fri, 13 Apr 2012 02:27:35 +0000 (10:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 16:51:07 +0000 (09:51 -0700)
commit7604ff9ce747b74ddff6ac5d118a442122fdcbd7
treef6b2123f31dc3478fd54b668d55e23b200fffdbd
parent56bd028ddf6c29e44b87ce0bd79754fe944d1850
jbd2: use GFP_NOFS for blkdev_issue_flush

commit 99aa78466777083255b876293e9e83dec7cd809a upstream.

flush request is issued in transaction commit code path, so looks using
GFP_KERNEL to allocate memory for flush request bio falls into the classic
deadlock issue.  I saw btrfs and dm get it right, but ext4, xfs and md are
using GFP.

Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jbd2/commit.c