Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935019AbbHDPNW (ORCPT ); Tue, 4 Aug 2015 11:13:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:58904 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756436AbbHDOl2 (ORCPT ); Tue, 4 Aug 2015 10:41:28 -0400 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Theodore Ts'o" , Jiri Slaby Subject: [PATCH 3.12 040/123] ext4: call sync_blockdev() before invalidate_bdev() in put_super() Date: Tue, 4 Aug 2015 16:39:44 +0200 Message-Id: <7e89b8e5bc51b3adc72a09429cf6cfb7b61fd68d.1438699154.git.jslaby@suse.cz> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1487 Lines: 44 From: Theodore Ts'o 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 89d96a6f8e6491f24fc8f99fd6ae66820e85c6c1 upstream. Normally all of the buffers will have been forced out to disk before we call invalidate_bdev(), but there will be some cases, where a file system operation was aborted due to an ext4_error(), where there may still be some dirty buffers in the buffer cache for the device. So try to force them out to memory before calling invalidate_bdev(). This fixes a warning triggered by generic/081: WARNING: CPU: 1 PID: 3473 at /usr/projects/linux/ext4/fs/block_dev.c:56 __blkdev_put+0xb5/0x16f() Signed-off-by: Theodore Ts'o Signed-off-by: Jiri Slaby --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6795499fefab..d520064ceddb 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -813,6 +813,7 @@ static void ext4_put_super(struct super_block *sb) dump_orphan_list(sb, sbi); J_ASSERT(list_empty(&sbi->s_orphan)); + sync_blockdev(sb->s_bdev); invalidate_bdev(sb->s_bdev); if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { /* -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/