linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime in __f2fs_setxattr()
@ 2023-07-19 13:50 Chao Yu
  2023-07-19 13:50 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unneeded check condition " Chao Yu
  2023-08-14 20:50 ` [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime " patchwork-bot+f2fs
  0 siblings, 2 replies; 3+ messages in thread
From: Chao Yu @ 2023-07-19 13:50 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

generic/728       - output mismatch (see /media/fstests/results//generic/728.out.bad)
    --- tests/generic/728.out	2023-07-19 07:10:48.362711407 +0000
    +++ /media/fstests/results//generic/728.out.bad	2023-07-19 08:39:57.000000000 +0000
     QA output created by 728
    +Expected ctime to change after setxattr.
    +Expected ctime to change after removexattr.
     Silence is golden
    ...
    (Run 'diff -u /media/fstests/tests/generic/728.out /media/fstests/results//generic/728.out.bad'  to see the entire diff)
generic/729        1s

It needs to update i_ctime after {set,remove}xattr, fix it.

Signed-off-by: Chao Yu <chao@kernel.org>
---
 fs/f2fs/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 476b186b90a6..71bfa2391ab4 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -757,17 +757,17 @@ static int __f2fs_setxattr(struct inode *inode, int index,
 	if (index == F2FS_XATTR_INDEX_ENCRYPTION &&
 			!strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT))
 		f2fs_set_encrypted_inode(inode);
-	f2fs_mark_inode_dirty_sync(inode, true);
 	if (!error && S_ISDIR(inode->i_mode))
 		set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_CP);
 
 same:
 	if (is_inode_flag_set(inode, FI_ACL_MODE)) {
 		inode->i_mode = F2FS_I(inode)->i_acl_mode;
-		inode->i_ctime = current_time(inode);
 		clear_inode_flag(inode, FI_ACL_MODE);
 	}
 
+	inode->i_ctime = current_time(inode);
+	f2fs_mark_inode_dirty_sync(inode, true);
 exit:
 	kfree(base_addr);
 	return error;
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [f2fs-dev] [PATCH 2/2] f2fs: remove unneeded check condition in __f2fs_setxattr()
  2023-07-19 13:50 [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime in __f2fs_setxattr() Chao Yu
@ 2023-07-19 13:50 ` Chao Yu
  2023-08-14 20:50 ` [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime " patchwork-bot+f2fs
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-07-19 13:50 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-kernel, linux-f2fs-devel

It has checked return value of write_all_xattrs(), remove unneeded
following check condition.

Signed-off-by: Chao Yu <chao@kernel.org>
---
 fs/f2fs/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 71bfa2391ab4..9cc1ca75b2da 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -757,7 +757,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
 	if (index == F2FS_XATTR_INDEX_ENCRYPTION &&
 			!strcmp(name, F2FS_XATTR_NAME_ENCRYPTION_CONTEXT))
 		f2fs_set_encrypted_inode(inode);
-	if (!error && S_ISDIR(inode->i_mode))
+	if (S_ISDIR(inode->i_mode))
 		set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_CP);
 
 same:
-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime in __f2fs_setxattr()
  2023-07-19 13:50 [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime in __f2fs_setxattr() Chao Yu
  2023-07-19 13:50 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unneeded check condition " Chao Yu
@ 2023-08-14 20:50 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-08-14 20:50 UTC (permalink / raw)
  To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 19 Jul 2023 21:50:45 +0800 you wrote:
> generic/728       - output mismatch (see /media/fstests/results//generic/728.out.bad)
>     --- tests/generic/728.out	2023-07-19 07:10:48.362711407 +0000
>     +++ /media/fstests/results//generic/728.out.bad	2023-07-19 08:39:57.000000000 +0000
>      QA output created by 728
>     +Expected ctime to change after setxattr.
>     +Expected ctime to change after removexattr.
>      Silence is golden
>     ...
>     (Run 'diff -u /media/fstests/tests/generic/728.out /media/fstests/results//generic/728.out.bad'  to see the entire diff)
> generic/729        1s
> 
> [...]

Here is the summary with links:
  - [f2fs-dev,1/2] f2fs: fix to update i_ctime in __f2fs_setxattr()
    https://git.kernel.org/jaegeuk/f2fs/c/8874ad7dae8d
  - [f2fs-dev,2/2] f2fs: remove unneeded check condition in __f2fs_setxattr()
    https://git.kernel.org/jaegeuk/f2fs/c/bc3994ffa4cf

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-14 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 13:50 [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime in __f2fs_setxattr() Chao Yu
2023-07-19 13:50 ` [f2fs-dev] [PATCH 2/2] f2fs: remove unneeded check condition " Chao Yu
2023-08-14 20:50 ` [f2fs-dev] [PATCH 1/2] f2fs: fix to update i_ctime " patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).