* [PATCH v2] xfs: directly call xfs_generic_create() for ->create() and ->mkdir()
@ 2020-09-25 2:43 xiakaixu1987
2020-09-25 18:14 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: xiakaixu1987 @ 2020-09-25 2:43 UTC (permalink / raw)
To: linux-xfs; +Cc: darrick.wong, Kaixu Xia
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>
---
v2:
-add the necessary space.
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..5e165456da68 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);
}
STATIC struct dentry *
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] xfs: directly call xfs_generic_create() for ->create() and ->mkdir()
2020-09-25 2:43 [PATCH v2] xfs: directly call xfs_generic_create() for ->create() and ->mkdir() xiakaixu1987
@ 2020-09-25 18:14 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2020-09-25 18:14 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-xfs, Kaixu Xia
On Fri, Sep 25, 2020 at 10:43:21AM +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>
Looks good to me,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> v2:
> -add the necessary space.
>
> 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..5e165456da68 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);
> }
>
> STATIC struct dentry *
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-25 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-25 2:43 [PATCH v2] xfs: directly call xfs_generic_create() for ->create() and ->mkdir() xiakaixu1987
2020-09-25 18:14 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox