From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:36916 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936193AbeFONCc (ORCPT ); Fri, 15 Jun 2018 09:02:32 -0400 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Subject: [PATCH 07/24] xfs: do not set the page uptodate in xfs_writepage_map Date: Fri, 15 Jun 2018 15:01:52 +0200 Message-Id: <20180615130209.1970-8-hch@lst.de> In-Reply-To: <20180615130209.1970-1-hch@lst.de> References: <20180615130209.1970-1-hch@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: We already track the page uptodate status based on the buffer uptodate status, which is updated whenever reading or zeroing blocks. This code has been there since commit a ptool commit in 2002, which claims to: "merge" the 2.4 fsx fix for block size < page size to 2.5. This needed major changes to actually fit. and isn't present in other writepage implementations. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_aops.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 026721c4991e..5c611c0784ca 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -850,7 +850,6 @@ xfs_writepage_map( uint64_t offset; int error = 0; int count = 0; - int uptodate = 1; unsigned int new_type; bh = head = page_buffers(page); @@ -858,8 +857,6 @@ xfs_writepage_map( do { if (offset >= end_offset) break; - if (!buffer_uptodate(bh)) - uptodate = 0; /* * set_page_dirty dirties all buffers in a page, independent @@ -923,9 +920,6 @@ xfs_writepage_map( } while (offset += len, ((bh = bh->b_this_page) != head)); - if (uptodate && bh == head) - SetPageUptodate(page); - ASSERT(wpc->ioend || list_empty(&submit_list)); out: -- 2.17.1