Re: [RFC PATCH] xfs: directly call xfs_generic_create() for ->create() and ->mkdir()

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

 



On Thu, Sep 24, 2020 at 10:30:17PM +0800, xiakaixu1987@xxxxxxxxx wrote:
> From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> 
> The current create and mkdir handlers both call the xfs_vn_mknod()
> which is a wrapper routine around xfs_generic_create() function.
> Actually the create and mkdir handlers can directly call
> xfs_generic_create() function and reduce the call chain.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> ---
>  fs/xfs/xfs_iops.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index 80a13c8561d8..b29d5b25634c 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -237,7 +237,7 @@ xfs_vn_create(
>  	umode_t		mode,
>  	bool		flags)
>  {
> -	return xfs_vn_mknod(dir, dentry, mode, 0);
> +	return xfs_generic_create(dir, dentry, mode, 0, false);
>  }
>  
>  STATIC int
> @@ -246,7 +246,7 @@ xfs_vn_mkdir(
>  	struct dentry	*dentry,
>  	umode_t		mode)
>  {
> -	return xfs_vn_mknod(dir, dentry, mode|S_IFDIR, 0);
> +	return xfs_generic_create(dir, dentry, mode|S_IFDIR, 0, false);

Might as well separate mode, the pipe, and S_IFDIR with a space...

--D

>  }
>  
>  STATIC struct dentry *
> -- 
> 2.20.0
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux