فهرست منبع

xfs: do not set the page uptodate in xfs_writepage_map

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 <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Christoph Hellwig 7 سال پیش
والد
کامیت
91cdfd1761
1فایلهای تغییر یافته به همراه0 افزوده شده و 6 حذف شده
  1. 0 6
      fs/xfs/xfs_aops.c

+ 0 - 6
fs/xfs/xfs_aops.c

@@ -849,7 +849,6 @@ xfs_writepage_map(
 	uint64_t		offset;
 	uint64_t		offset;
 	int			error = 0;
 	int			error = 0;
 	int			count = 0;
 	int			count = 0;
-	int			uptodate = 1;
 	unsigned int		new_type;
 	unsigned int		new_type;
 
 
 	bh = head = page_buffers(page);
 	bh = head = page_buffers(page);
@@ -857,8 +856,6 @@ xfs_writepage_map(
 	do {
 	do {
 		if (offset >= end_offset)
 		if (offset >= end_offset)
 			break;
 			break;
-		if (!buffer_uptodate(bh))
-			uptodate = 0;
 
 
 		/*
 		/*
 		 * set_page_dirty dirties all buffers in a page, independent
 		 * set_page_dirty dirties all buffers in a page, independent
@@ -922,9 +919,6 @@ xfs_writepage_map(
 
 
 	} while (offset += len, ((bh = bh->b_this_page) != head));
 	} while (offset += len, ((bh = bh->b_this_page) != head));
 
 
-	if (uptodate && bh == head)
-		SetPageUptodate(page);
-
 	ASSERT(wpc->ioend || list_empty(&submit_list));
 	ASSERT(wpc->ioend || list_empty(&submit_list));
 
 
 out:
 out: