[PATCH] fs: Do not check for valid page->mapping in page_cache_pipe_buf_confirm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the page is truncated after being spliced into the pipe, it's
probably not invalid.

For filesystems that invalidate pages, we used to return -ENODATA
even though the data is there, it's just possibly different from
what was spliced into the pipe. We shouldn't have to throw away
the buffer or return error in this case.

Signed-off-by: Abhi Das <adas@xxxxxxxxxx>
CC: Miklos Szeredi <mszeredi@xxxxxxxxxx>
CC: Jens Axboe <axboe@xxxxxx>
CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
 fs/splice.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/fs/splice.c b/fs/splice.c
index dd9bf7e..b9899b99 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -106,15 +106,6 @@ static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe,
 		lock_page(page);
 
 		/*
-		 * Page got truncated/unhashed. This will cause a 0-byte
-		 * splice, if this is the first page.
-		 */
-		if (!page->mapping) {
-			err = -ENODATA;
-			goto error;
-		}
-
-		/*
 		 * Uh oh, read-error from disk.
 		 */
 		if (!PageUptodate(page)) {
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux