Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933822Ab3CHMij (ORCPT ); Fri, 8 Mar 2013 07:38:39 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:50231 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932120Ab3CHMih (ORCPT ); Fri, 8 Mar 2013 07:38:37 -0500 Message-ID: <5139DB90.5090302@gmail.com> Date: Fri, 08 Mar 2013 20:37:36 +0800 From: Shuge User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org CC: Kevin , Jan Kara , "Theodore Ts'o" , Jens Axboe Subject: [PATCH] bounce:fix bug, avoid to flush dcache on slab page from jbd2. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 33 The bounce accept slab pages from jbd2, and flush dcache on them. When enabling VM_DEBUG, it will tigger VM_BUG_ON in page_mapping(). So, check PageSlab to avoid it in __blk_queue_bounce(). Bug URL: http://lkml.org/lkml/2013/3/7/56 Signed-off-by: shuge --- mm/bounce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/bounce.c b/mm/bounce.c index 4e9ae72..f352c03 100644 --- a/mm/bounce.c +++ b/mm/bounce.c @@ -214,7 +214,8 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, if (rw == WRITE) { char *vto, *vfrom; - flush_dcache_page(from->bv_page); + if (unlikely(!PageSlab(from->bv_page))) + flush_dcache_page(from->bv_page); vto = page_address(to->bv_page) + to->bv_offset; vfrom = kmap(from->bv_page) + from->bv_offset; memcpy(vto, vfrom, to->bv_len); -- 1.7.9.5 -- 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/