summaryrefslogtreecommitdiff
path: root/fs/netfs/misc.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-10-24 18:08:16 +0100
committerChristian Brauner <brauner@kernel.org>2025-10-31 13:11:38 +0100
commit2408900d408ae55ab89861d2dd75ef6e51405dcd (patch)
treef7e2699d41d4023f414b2f3d4642166db535673d /fs/netfs/misc.c
parentac97520804757b685bc3f29811ac25616183ead3 (diff)
netfs: Use folio_next_pos()
This is one instruction more efficient than open-coding folio_pos() + folio_size(). It's the equivalent of (x + y) << z rather than x << z + y << z. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20251024170822.1427218-9-willy@infradead.org Acked-by: David Howells <dhowells@redhat.com> Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org> Cc: David Howells <dhowells@redhat.com> Cc: Paulo Alcantara <pc@manguebit.org> Cc: netfs@lists.linux.dev Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/netfs/misc.c')
-rw-r--r--fs/netfs/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/netfs/misc.c b/fs/netfs/misc.c
index 486166460e17..82342c6d22cb 100644
--- a/fs/netfs/misc.c
+++ b/fs/netfs/misc.c
@@ -298,7 +298,7 @@ bool netfs_release_folio(struct folio *folio, gfp_t gfp)
if (folio_test_dirty(folio))
return false;
- end = umin(folio_pos(folio) + folio_size(folio), i_size_read(&ctx->inode));
+ end = umin(folio_next_pos(folio), i_size_read(&ctx->inode));
if (end > ctx->zero_point)
ctx->zero_point = end;