From 2eb86bd2fe324ad7cf92e79e1751830adc5cc4e4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 8 Mar 2017 15:17:55 +0100 Subject: [PATCH] delete queue-4.4/cifs-fix-splice-read-for-non-cached-files.patch --- ...fix-splice-read-for-non-cached-files.patch | 45 ------------------- queue-4.4/series | 1 - 2 files changed, 46 deletions(-) delete mode 100644 queue-4.4/cifs-fix-splice-read-for-non-cached-files.patch diff --git a/queue-4.4/cifs-fix-splice-read-for-non-cached-files.patch b/queue-4.4/cifs-fix-splice-read-for-non-cached-files.patch deleted file mode 100644 index 36f722a9a9f..00000000000 --- a/queue-4.4/cifs-fix-splice-read-for-non-cached-files.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9c25702cee1405099f982894c865c163de7909a8 Mon Sep 17 00:00:00 2001 -From: Pavel Shilovsky -Date: Thu, 19 Jan 2017 13:53:15 -0800 -Subject: CIFS: Fix splice read for non-cached files - -From: Pavel Shilovsky - -commit 9c25702cee1405099f982894c865c163de7909a8 upstream. - -Currently we call copy_page_to_iter() for uncached reading into a pipe. -This is wrong because it treats pages as VFS cache pages and copies references -rather than actual data. When we are trying to read from the pipe we end up -calling page_cache_pipe_buf_confirm() which returns -ENODATA. This error -is translated into 0 which is returned to a user. - -This issue is reproduced by running xfs-tests suite (generic test #249) -against mount points with "cache=none". Fix it by mapping pages manually -and calling copy_to_iter() that copies data into the pipe. - -Signed-off-by: Pavel Shilovsky -Signed-off-by: Greg Kroah-Hartman - ---- - fs/cifs/file.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - ---- a/fs/cifs/file.c -+++ b/fs/cifs/file.c -@@ -2840,7 +2840,15 @@ cifs_readdata_to_iov(struct cifs_readdat - for (i = 0; i < rdata->nr_pages; i++) { - struct page *page = rdata->pages[i]; - size_t copy = min_t(size_t, remaining, PAGE_SIZE); -- size_t written = copy_page_to_iter(page, 0, copy, iter); -+ size_t written; -+ -+ if (unlikely(iter->type & ITER_PIPE)) { -+ void *addr = kmap_atomic(page); -+ -+ written = copy_to_iter(addr, copy, iter); -+ kunmap_atomic(addr); -+ } else -+ written = copy_page_to_iter(page, 0, copy, iter); - remaining -= written; - if (written < copy && iov_iter_count(iter) > 0) - break; diff --git a/queue-4.4/series b/queue-4.4/series index ba065c5ca6a..be32022bae7 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -25,7 +25,6 @@ staging-rtl-fix-possible-null-pointer-dereference.patch regulator-fix-regulator_summary-for-deviceless-consumers.patch iommu-vt-d-fix-some-macros-that-are-incorrectly-specified-in-intel-iommu.patch iommu-vt-d-tylersburg-isoch-identity-map-check-is-done-too-late.patch -cifs-fix-splice-read-for-non-cached-files.patch mm-page_alloc-fix-nodes-for-reclaim-in-fast-path.patch mm-vmpressure-fix-sending-wrong-events-on-underflow.patch mm-do-not-access-page-mapping-directly-on-page_endio.patch -- 2.47.3