From patchwork Mon Feb 2 10:04:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Katiyar X-Patchwork-Id: 21553 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 186B0DDE28 for ; Mon, 2 Feb 2009 21:04:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbZBBKEa (ORCPT ); Mon, 2 Feb 2009 05:04:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752531AbZBBKEa (ORCPT ); Mon, 2 Feb 2009 05:04:30 -0500 Received: from ti-out-0910.google.com ([209.85.142.184]:59567 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbZBBKE3 (ORCPT ); Mon, 2 Feb 2009 05:04:29 -0500 Received: by ti-out-0910.google.com with SMTP id b6so701164tic.23 for ; Mon, 02 Feb 2009 02:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=OHnBecZihKrRlkCp/v5hflTenWoQrI/jmLQXXYNXCQM=; b=QjHJX8L0myQzM+fefgprvZnmOcsdKakrCaO5RgoOJUfdqIXV7q+aVlWL5UbkMXTibM tyPvuQqtkdvqz1OyGswXNX2UI190tZQ/tnncU+d3HsEHK3wmGVZHF4zUlJyyfLVSt/Uh muvsMKOT1XpuJ5aGZN5UEAeBcUky5/a9BUK34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=sCN+J4JU4qf3Ad34whfKgGWpb+ZFwJ00ccQH336t8XLLTkTz3n0ZlSpV6GJ5rBDSk4 1pr2o9h1FQIwPxSGZVShI5sopevQZ4KUtmx9LfB/P8IjdgMcrHCcwHyri9zBMiQvS6f0 v1mPCecFL421qz0d71VKjfnxJ0+YeSwhIDyGo= MIME-Version: 1.0 Received: by 10.110.61.18 with SMTP id j18mr6229283tia.56.1233569067888; Mon, 02 Feb 2009 02:04:27 -0800 (PST) Date: Mon, 2 Feb 2009 15:34:27 +0530 Message-ID: Subject: [PATCH] ext2: Mark the buffer as unmapped before reading the next quota block From: Manish Katiyar To: "Theodore Ts'o" , ext4 , Jan Kara , cmm@us.ibm.com Cc: mkatiyar@gmail.com Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Jan, This is in continuation with the previous patch (http://patchwork.ozlabs.org/patch/20275/) . We also need to set the buffer as unmapped before reading the next block. I don't think quota files can have holes, but atleast for correctness, otherwise once we have read a block, tmp_bh is always mapped even for holes. Signed-off-by: Manish Katiyar --- fs/ext2/super.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) return err; diff --git a/fs/ext2/super.c b/fs/ext2/super.c index da8bdea..b4e7633 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1328,6 +1328,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, sb->s_blocksize - offset : toread; tmp_bh.b_state = 0; + clear_buffer_mapped(&tmp_bh); err = ext2_get_block(inode, blk, &tmp_bh, 0); if (err < 0)