From patchwork Fri Feb 19 01:22:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yehuda Sadeh X-Patchwork-Id: 80518 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1J1aADU023249 for ; Fri, 19 Feb 2010 01:36:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753231Ab0BSBfz (ORCPT ); Thu, 18 Feb 2010 20:35:55 -0500 Received: from mail.hq.newdream.net ([66.33.206.127]:58469 "EHLO mail.hq.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753220Ab0BSBfy (ORCPT ); Thu, 18 Feb 2010 20:35:54 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Feb 2010 01:36:11 +0000 (UTC) X-Greylist: delayed 1110 seconds by postgrey-1.27 at vger.kernel.org; Thu, 18 Feb 2010 20:35:54 EST Received: from mail.hq.newdream.net (localhost [127.0.0.1]) by mail.hq.newdream.net (Postfix) with ESMTP id 867EB265C7; Thu, 18 Feb 2010 17:17:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=hq.newdream.net; h=from:to :cc:subject:date:message-id; s=drama; bh=G/lkeJcj6aynpOmgUJ+9wM3 2bSY=; b=QLlhRwaivqZmN2hI6NFzaK2tVuXvQfKWAOcaKKF3Rzv/0s6C1SNBvdS 4v2LKrYBBP1buTW6RSNul+nE4PkZK2I39I0Y3+9iyOWRnmwMMCv+Zr813F0JB6Ln QF+4Fi4Qt/SkfjLEe2uqkdXCsCyjRu+jSswnq14iOWFLaeTvUlcI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=hq.newdream.net; h=from:to :cc:subject:date:message-id; q=dns; s=drama; b=ZHBNSZfmod+9+Klg7 98DTWnLq4L70MVOmgg3zOaI3cL95q5VLxAbczdU4MEJSO6TwfDaRURv8Fxr6hdMb yB5Zd1ixip2UtSnfv8f6CpY7NAaVNTc89Ina2NGvcaZqBqgX9vQbNRMR+8BXihYY 7fP3NNkKrnKmUSaHtJs6KvJMgk= Received: from localhost.localdomain (ip-66-33-206-8.dreamhost.com [66.33.206.8]) by mail.hq.newdream.net (Postfix) with ESMTP id 79B002634C; Thu, 18 Feb 2010 17:17:24 -0800 (PST) From: Yehuda Sadeh To: linux-mm@kvack.org Cc: Yehuda Sadeh , linux-btrfs@vger.kernel.org, sage@newdream.net Subject: [PATCH 1/1] mm: invalidate_mapping_pages checks boundaries when lock fails Date: Thu, 18 Feb 2010 17:22:17 -0800 Message-Id: <1266542537-5040-1-git-send-email-yehuda@hq.newdream.net> X-Mailer: git-send-email 1.5.6.5 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff --git a/mm/truncate.c b/mm/truncate.c index 450cebd..abb67d4 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -345,11 +345,12 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping, next = index; next++; if (lock_failed) - continue; + goto unlocked; ret += invalidate_inode_page(page); unlock_page(page); +unlocked: if (next > end) break; }