]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - fs/splice.c
splice: remove permission hook from do_splice_direct()
[thirdparty/linux.git] / fs / splice.c
index d983d375ff1130b5b054241612f56d4510d65589..6e917db6f49aabbcfaaae5f9c39d053935d49dab 100644 (file)
@@ -1166,6 +1166,7 @@ static void direct_file_splice_eof(struct splice_desc *sd)
  *    (splice in + splice out, as compared to just sendfile()). So this helper
  *    can splice directly through a process-private pipe.
  *
+ * Callers already called rw_verify_area() on the entire range.
  */
 long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
                      loff_t *opos, size_t len, unsigned int flags)
@@ -1187,10 +1188,6 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
        if (unlikely(out->f_flags & O_APPEND))
                return -EINVAL;
 
-       ret = rw_verify_area(WRITE, out, opos, len);
-       if (unlikely(ret < 0))
-               return ret;
-
        ret = splice_direct_to_actor(in, &sd, direct_splice_actor);
        if (ret > 0)
                *ppos = sd.pos;