Skip to contentSkip to conversation

f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode

PATCH In review Jaegeuk Kim 2 participants 2 messages Mar 25, 2022 – Mar 26, 2022 F2FS file system

lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: remove unnecessary f2fs_lock_op in f2fs_new_inode

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.

---
 fs/f2fs/namei.c | 3 ---
 1 file changed, 3 deletions(-)
fs/f2fs/namei.c +0 -3
index 5ed79b29999f..816285414564 100644
@@ -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;
 
Signature · 8 lines
2.35.1.1021.g381101b075-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel