Re: [PATCH v3 1/5] splice: return type ssize_t from all helpers

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

 



On Tue, Dec 12, 2023 at 03:19:37PM +0100, Jan Kara wrote:
> On Tue 12-12-23 11:44:36, 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>
> 
> Looks good to me. Just one nit below. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>
> 
> > diff --git a/fs/splice.c b/fs/splice.c
> > index 7cda013e5a1e..13030ce192d9 100644
> > --- a/fs/splice.c
> > +++ b/fs/splice.c
> > @@ -201,7 +201,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
> >  	unsigned int tail = pipe->tail;
> >  	unsigned int head = pipe->head;
> >  	unsigned int mask = pipe->ring_size - 1;
> > -	int ret = 0, page_nr = 0;
> > +	ssize_t ret = 0, page_nr = 0;
> 
> A nit but page_nr should stay to be 'int'.

Fixed in-tree.




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

  Powered by Linux