]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/splice.c
pstore/ram_core: Do not reset restored zone's position and size
[karo-tx-linux.git] / fs / splice.c
index f8476841eb04e08edc2ad069e97cddc3da242e7f..c9f1318a3b820b363526576036c4894205552921 100644 (file)
@@ -1003,8 +1003,10 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
                mutex_lock_nested(&inode->i_mutex, I_MUTEX_CHILD);
                ret = file_remove_suid(out);
                if (!ret) {
-                       file_update_time(out);
-                       ret = splice_from_pipe_feed(pipe, &sd, pipe_to_file);
+                       ret = file_update_time(out);
+                       if (!ret)
+                               ret = splice_from_pipe_feed(pipe, &sd,
+                                                           pipe_to_file);
                }
                mutex_unlock(&inode->i_mutex);
        } while (ret > 0);
@@ -1388,7 +1390,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
  */
 static int get_iovec_page_array(const struct iovec __user *iov,
                                unsigned int nr_vecs, struct page **pages,
-                               struct partial_page *partial, int aligned,
+                               struct partial_page *partial, bool aligned,
                                unsigned int pipe_buffers)
 {
        int buffers = 0, error = 0;
@@ -1626,7 +1628,7 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov,
                return -ENOMEM;
 
        spd.nr_pages = get_iovec_page_array(iov, nr_segs, spd.pages,
-                                           spd.partial, flags & SPLICE_F_GIFT,
+                                           spd.partial, false,
                                            pipe->buffers);
        if (spd.nr_pages <= 0)
                ret = spd.nr_pages;