Thread (23 messages) 23 messages, 3 authors, 2021-05-25
STALE1879d

[PATCH 06/11] xfs: remove the size and nbytes variables in xfs_buf_alloc_pages

From: Christoph Hellwig <hch@lst.de>
Date: 2021-05-19 19:09:28
Subsystem: filesystems (vfs and infrastructure), the rest, xfs filesystem · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Carlos Maiolino

These variables are not used for anything but recursively updating each
other.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_buf.c | 5 -----
 1 file changed, 5 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 76240d84d58b61..08c8667e6027fc 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -383,8 +383,6 @@ xfs_buf_alloc_pages(
 	struct xfs_buf		*bp,
 	uint			flags)
 {
-	size_t			size;
-	size_t			nbytes;
 	gfp_t			gfp_mask = xb_to_gfp(flags);
 	unsigned short		page_count, i;
 	xfs_off_t		start, end;
@@ -396,7 +394,6 @@ xfs_buf_alloc_pages(
 	if (!(flags & XBF_READ))
 		gfp_mask |= __GFP_ZERO;
 
-	size = BBTOB(bp->b_length);
 	start = BBTOB(bp->b_maps[0].bm_bn) >> PAGE_SHIFT;
 	end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1)
 								>> PAGE_SHIFT;
@@ -436,8 +433,6 @@ xfs_buf_alloc_pages(
 			goto retry;
 		}
 
-		nbytes = min_t(size_t, size, PAGE_SIZE);
-		size -= nbytes;
 		bp->b_pages[i] = page;
 	}
 	return 0;
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help