Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757644Ab1EaAyH (ORCPT ); Mon, 30 May 2011 20:54:07 -0400 Received: from smtp-out.google.com ([74.125.121.67]:53133 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753325Ab1EaAyE (ORCPT ); Mon, 30 May 2011 20:54:04 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; b=GnC0Q65fswuo9di8QFvYw6RCCxoL5DZuBjD1tjxNgUdDBiPjwtW4d5+3xjPpiduoGa zUZ2nd7K0uGEwduN1Adw== Date: Mon, 30 May 2011 17:54:00 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: Andrew Morton cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 13/14] mm: pincer in truncate_inode_pages_range In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 27 truncate_inode_pages_range()'s final loop has a nice pincer property, bringing start and end together, squeezing out the last pages. But the range handling missed out on that, just sliding up the range, perhaps letting pages come in behind it. Add one more test to give it the same pincer effect. Signed-off-by: Hugh Dickins --- mm/truncate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux.orig/mm/truncate.c 2011-05-30 15:01:01.660093602 -0700 +++ linux/mm/truncate.c 2011-05-30 15:03:28.688822856 -0700 @@ -269,7 +269,7 @@ void truncate_inode_pages_range(struct a index = start; continue; } - if (pvec.pages[0]->index > end) { + if (index == start && pvec.pages[0]->index > end) { pagevec_release(&pvec); break; } -- 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/