From: Abhi Das <adas@redhat.com>
To: cluster-devel@redhat.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Cc: Abhi Das <adas@redhat.com>, Miklos Szeredi <mszeredi@redhat.com>,
Jens Axboe <axboe@fb.com>, Al Viro <viro@zeniv.linux.org.uk>
Subject: [PATCH] fs: Do not check for valid page->mapping in page_cache_pipe_buf_confirm
Date: Wed, 25 May 2016 22:24:45 -0500 [thread overview]
Message-ID: <1464233085-19165-1-git-send-email-adas@redhat.com> (raw)
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@redhat.com>
CC: Miklos Szeredi <mszeredi@redhat.com>
CC: Jens Axboe <axboe@fb.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
---
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
next reply other threads:[~2016-05-26 3:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 3:24 Abhi Das [this message]
2016-06-28 14:23 ` [PATCH] fs: Do not check for valid page->mapping in page_cache_pipe_buf_confirm Abhijith Das
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464233085-19165-1-git-send-email-adas@redhat.com \
--to=adas@redhat.com \
--cc=axboe@fb.com \
--cc=cluster-devel@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).