On Mon, Dec 11, 2023 at 4:39 PM Jan Kara <jack@xxxxxxx> wrote: > > On Sun 10-12-23 16:18:57, Amir Goldstein wrote: > > Not sure why some splice helpers return long, maybe historic reasons. > > Change them all to return ssize_t to conform to the splice methods and > > to the rest of the helpers. > > > > Suggested-by: Christian Brauner <brauner@xxxxxxxxxx> > > Link: https://lore.kernel.org/r/20231208-horchen-helium-d3ec1535ede5@brauner/ > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > > > @@ -955,9 +955,9 @@ static void do_splice_eof(struct splice_desc *sd) > > * Callers already called rw_verify_area() on the entire range. > > * No need to call it for sub ranges. > > */ > > -static long do_splice_read(struct file *in, loff_t *ppos, > > - struct pipe_inode_info *pipe, size_t len, > > - unsigned int flags) > > +static size_t do_splice_read(struct file *in, loff_t *ppos, > ^^^ ssize_t here? > > > + struct pipe_inode_info *pipe, size_t len, > > + unsigned int flags) > > { > > unsigned int p_space; > > > > @@ -1030,7 +1030,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, > > splice_direct_actor *actor) > > { > > struct pipe_inode_info *pipe; > > - long ret, bytes; > > + size_t ret, bytes; > ^^^^ ssize_t here? > Yap, I had more than one miss... > > size_t len; > > int i, flags, more; > > > ... > > @@ -1962,7 +1962,7 @@ static int link_pipe(struct pipe_inode_info *ipipe, > > * The 'flags' used are the SPLICE_F_* variants, currently the only > > * applicable one is SPLICE_F_NONBLOCK. > > */ > > Actually link_pipe() should also return ssize_t instead of int, shouldn't > it? Wouldn't hurt. I also see that I missed the vmsplice_ helpers. I see v3 in my future... Thanks, Amir.