Skip to content

Commit 51d3798

Browse files
dhowellsbrauner
authored andcommitted
cachefiles: Set the max subreq size for cache writes to MAX_RW_COUNT
Set the maximum size of a subrequest that writes to cachefiles to be MAX_RW_COUNT so that we don't overrun the maximum write we can make to the backing filesystem. Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/r/[email protected] cc: Jeff Layton <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 212be98 commit 51d3798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cachefiles/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static void cachefiles_prepare_write_subreq(struct netfs_io_subrequest *subreq)
630630

631631
_enter("W=%x[%x] %llx", wreq->debug_id, subreq->debug_index, subreq->start);
632632

633-
subreq->max_len = ULONG_MAX;
633+
subreq->max_len = MAX_RW_COUNT;
634634
subreq->max_nr_segs = BIO_MAX_VECS;
635635

636636
if (!cachefiles_cres_file(cres)) {

0 commit comments

Comments
 (0)