* [obsolete] shmem-apply-a-couple-of-filemap_splice_read-fixes-to-shmem_splice_read.patch removed from -mm tree
@ 2023-07-27 20:04 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-07-27 20:04 UTC (permalink / raw)
To: mm-commits, willy, viro, jhubbard, hughd, hch, david, chuck.lever,
axboe, dhowells, akpm
The quilt patch titled
Subject: shmem: apply a couple of filemap_splice_read() fixes to shmem_splice_read()
has been removed from the -mm tree. Its filename was
shmem-apply-a-couple-of-filemap_splice_read-fixes-to-shmem_splice_read.patch
This patch was dropped because it is obsolete
------------------------------------------------------
From: David Howells <dhowells@redhat.com>
Subject: shmem: apply a couple of filemap_splice_read() fixes to shmem_splice_read()
Date: Thu, 27 Jul 2023 17:10:16 +0100
Fix shmem_splice_read() to use the inode from in->f_mapping->host rather
than file_inode(in) and to skip the splice if it starts after s_maxbytes,
analogously with fixes to filemap_splice_read().
Link: https://lkml.kernel.org/r/20230727161016.169066-3-dhowells@redhat.com
Fixes: bd194b187115 ("shmem: Implement splice-read")
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/mm/shmem.c~shmem-apply-a-couple-of-filemap_splice_read-fixes-to-shmem_splice_read
+++ a/mm/shmem.c
@@ -2797,13 +2797,16 @@ static ssize_t shmem_file_splice_read(st
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{
- struct inode *inode = file_inode(in);
+ struct inode *inode = in->f_mapping->host;
struct address_space *mapping = inode->i_mapping;
struct folio *folio = NULL;
size_t total_spliced = 0, used, npages, n, part;
loff_t isize;
int error = 0;
+ if (unlikely(*ppos >= inode->i_sb->s_maxbytes))
+ return 0;
+
/* Work out how much data we can actually add into the pipe */
used = pipe_occupancy(pipe->head, pipe->tail);
npages = max_t(ssize_t, pipe->max_usage - used, 0);
_
Patches currently in -mm which might be from dhowells@redhat.com are
crypto-cifs-fix-error-handling-in-extract_iter_to_sg.patch
mm-merge-folio_has_private-filemap_release_folio-call-pairs.patch
mm-netfs-fscache-stop-read-optimisation-when-folio-removed-from-pagecache.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-27 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 20:04 [obsolete] shmem-apply-a-couple-of-filemap_splice_read-fixes-to-shmem_splice_read.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.