mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate
@ 2022-10-18  0:58 Jaegeuk Kim
  2022-10-20  1:13 ` [f2fs-dev] " Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2022-10-18  0:58 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

f2fs_unlink
 -> f2fs_lock_op
 -> d_invalidate
  -> shrink_dentry_list
   -> iput_final
    -> f2fs_evict_inode
     -> f2fs_lock_op

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/namei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index a389772fd212..e104409c3a0e 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -632,6 +632,8 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
 		goto fail;
 	}
 	f2fs_delete_entry(de, page, dir, inode);
+	f2fs_unlock_op(sbi);
+
 #if IS_ENABLED(CONFIG_UNICODE)
 	/* VFS negative dentries are incompatible with Encoding and
 	 * Case-insensitiveness. Eventually we'll want avoid
@@ -642,8 +644,6 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
 	if (IS_CASEFOLDED(dir))
 		d_invalidate(dentry);
 #endif
-	f2fs_unlock_op(sbi);
-
 	if (IS_DIRSYNC(dir))
 		f2fs_sync_fs(sbi->sb, 1);
 fail:
-- 
2.38.0.413.g74048e4d9e-goog


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

* Re: [f2fs-dev] [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate
  2022-10-18  0:58 [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate Jaegeuk Kim
@ 2022-10-20  1:13 ` Chao Yu
  2022-10-21 18:38   ` Yangtao Li
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2022-10-20  1:13 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel

On 2022/10/18 8:58, Jaegeuk Kim wrote:
> f2fs_unlink
>   -> f2fs_lock_op
>   -> d_invalidate
>    -> shrink_dentry_list
>     -> iput_final
>      -> f2fs_evict_inode
>       -> f2fs_lock_op
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

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

* Re: [f2fs-dev] [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate
  2022-10-20  1:13 ` [f2fs-dev] " Chao Yu
@ 2022-10-21 18:38   ` Yangtao Li
  0 siblings, 0 replies; 3+ messages in thread
From: Yangtao Li @ 2022-10-21 18:38 UTC (permalink / raw)
  To: chao; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel, Yangtao Li

Tested-by: Yangtao Li <frank.li@vivo.com>

Thanks,

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

end of thread, other threads:[~2022-10-21 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18  0:58 [PATCH] f2fs: let's avoid to get cp_rwsem twice by f2fs_evict_inode by d_invalidate Jaegeuk Kim
2022-10-20  1:13 ` [f2fs-dev] " Chao Yu
2022-10-21 18:38   ` Yangtao Li

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®