* [PATCH] f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode
@ 2022-03-25 18:18 Jaegeuk Kim
2022-03-26 8:41 ` [f2fs-dev] " Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Jaegeuk Kim @ 2022-03-25 18:18 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim, Linus Torvalds
This can be removed, since f2fs_alloc_nid() actually doesn't require to block
checkpoint and __f2fs_build_free_nids() is covered by nm_i->nat_tree_lock.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/namei.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 5ed79b29999f..816285414564 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -37,13 +37,10 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
if (!inode)
return ERR_PTR(-ENOMEM);
- f2fs_lock_op(sbi);
if (!f2fs_alloc_nid(sbi, &ino)) {
- f2fs_unlock_op(sbi);
err = -ENOSPC;
goto fail;
}
- f2fs_unlock_op(sbi);
nid_free = true;
--
2.35.1.1021.g381101b075-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode
2022-03-25 18:18 [PATCH] f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode Jaegeuk Kim
@ 2022-03-26 8:41 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2022-03-26 8:41 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel; +Cc: Linus Torvalds
On 2022/3/26 2:18, Jaegeuk Kim wrote:
> This can be removed, since f2fs_alloc_nid() actually doesn't require to block
> checkpoint and __f2fs_build_free_nids() is covered by nm_i->nat_tree_lock.
>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Looks fine, but still it needs more test to check stability w/ the patch. ;)
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-26 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 18:18 [PATCH] f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode Jaegeuk Kim
2022-03-26 8:41 ` [f2fs-dev] " Chao Yu
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).