From: Sheng Yong <shengyong@oppo.com>
To: jaegeuk@kernel.org, chao@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Sheng Yong <shengyong@oppo.com>
Subject: [PATCH v2 2/2] f2fs: move set_file_temperature into f2fs_new_inode
Date: Fri, 11 Nov 2022 18:08:30 +0800 [thread overview]
Message-ID: <20221111100830.953733-2-shengyong@oppo.com> (raw)
In-Reply-To: <20221111100830.953733-1-shengyong@oppo.com>
Since the file name has already passed to f2fs_new_inode(), let's
move set_file_temperature() into f2fs_new_inode().
Signed-off-by: Sheng Yong <shengyong@oppo.com>
---
fs/f2fs/namei.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 36e251f438568..04bc7ec5e29e9 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -131,6 +131,9 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
set_inode_flag(inode, FI_INLINE_DATA);
+ if (name && !test_opt(sbi, DISABLE_EXT_IDENTIFY))
+ set_file_temperature(sbi, inode, name);
+
stat_inc_inline_xattr(inode);
stat_inc_inline_inode(inode);
stat_inc_inline_dir(inode);
@@ -357,9 +360,6 @@ static int f2fs_create(struct user_namespace *mnt_userns, struct inode *dir,
if (IS_ERR(inode))
return PTR_ERR(inode);
- if (!test_opt(sbi, DISABLE_EXT_IDENTIFY))
- set_file_temperature(sbi, inode, dentry->d_name.name);
-
inode->i_op = &f2fs_file_inode_operations;
inode->i_fop = &f2fs_file_operations;
inode->i_mapping->a_ops = &f2fs_dblock_aops;
--
2.25.1
next prev parent reply other threads:[~2022-11-11 10:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 10:08 [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches Sheng Yong
2022-11-11 10:08 ` Sheng Yong [this message]
2022-11-11 10:20 ` [PATCH v2 2/2] f2fs: move set_file_temperature into f2fs_new_inode Chao Yu
2022-11-14 22:40 ` Jaegeuk Kim
2022-11-11 10:20 ` [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches Chao Yu
2022-11-12 1:27 ` Jaegeuk Kim
2022-11-14 1:42 ` Sheng Yong
2022-11-14 16:05 ` Chao Yu
2022-11-14 22:39 ` Jaegeuk Kim
2022-11-15 0:20 ` [f2fs-dev] " Jaegeuk Kim
2022-11-15 1:49 ` Chao Yu
2022-11-15 16:01 ` [PATCH v3] " Sheng Yong
2022-11-15 21:48 ` Jaegeuk Kim
2022-11-15 22:45 ` Jaegeuk Kim
2022-11-15 23:00 ` [PATCH v4] " Jaegeuk Kim
2022-11-16 2:21 ` Sheng Yong
2022-11-17 1:13 ` Jaegeuk Kim
2022-11-23 21:46 ` [f2fs-dev] [PATCH v5] " Jaegeuk Kim
2022-11-24 14:27 ` Chao Yu
2022-11-17 1:12 ` [PATCH v4] " Jaegeuk Kim
2022-11-23 14:54 ` Chao Yu
2022-11-23 16:09 ` Sheng Yong
2022-11-23 21:29 ` Jaegeuk Kim
2022-11-24 2:38 ` Chao Yu
2022-11-15 1:34 ` [PATCH v2 1/2] " Chao Yu
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=20221111100830.953733-2-shengyong@oppo.com \
--to=shengyong@oppo.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®