Re: [PATCH 08/18] fs: add fget_many() and fput_many()

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

 



> +struct file *fget_many(unsigned int fd, unsigned int refs)
> +{
> +	return __fget(fd, FMODE_PATH, refs);
> +}
> +
>  struct file *fget(unsigned int fd)
>  {
> -	return __fget(fd, FMODE_PATH);
> +	return fget_many(fd, 1);

I'd still prefer removing the double indirection in this call, but
I know you disagree.

>  }
>  EXPORT_SYMBOL(fget);
>  
>  struct file *fget_raw(unsigned int fd)
>  {
> -	return __fget(fd, 0);
> +	return __fget(fd, 0, 1);
>  }
>  EXPORT_SYMBOL(fget_raw);

Especially as we already avoid it here..

Otherwise looks fine to me:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



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

  Powered by Linux