public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: kaixuxia <xiakaixu1987@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org, Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [RFC PATCH] xfs: directly call xfs_generic_create() for ->create() and ->mkdir()
Date: Fri, 25 Sep 2020 10:31:37 +0800	[thread overview]
Message-ID: <38979b48-7600-2abd-7e36-8c025184da37@gmail.com> (raw)
In-Reply-To: <20200924150827.GF7955@magnolia>



On 2020/9/24 23:08, Darrick J. Wong wrote:
> On Thu, Sep 24, 2020 at 10:30:17PM +0800, xiakaixu1987@gmail.com wrote:
>> From: Kaixu Xia <kaixuxia@tencent.com>
>>
>> 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@tencent.com>
>> ---
>>  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...

Yeah, will fix it in the next version.

Thanks,
Kaixu
> 
> --D
> 
>>  }
>>  
>>  STATIC struct dentry *
>> -- 
>> 2.20.0
>>

-- 
kaixuxia

      reply	other threads:[~2020-09-25  2:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 14:30 [RFC PATCH] xfs: directly call xfs_generic_create() for ->create() and ->mkdir() xiakaixu1987
2020-09-24 15:08 ` Darrick J. Wong
2020-09-25  2:31   ` kaixuxia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38979b48-7600-2abd-7e36-8c025184da37@gmail.com \
    --to=xiakaixu1987@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=kaixuxia@tencent.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox