Skip to contentSkip to conversation

f2fs: avoid unneeded error handling for revoke_entry_slab allocation

PATCH New Chao Yu 1 participant 1 message May 25, 2022 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: avoid unneeded error handling for revoke_entry_slab allocation

In __f2fs_commit_atomic_write(), we will guarantee success of revoke_entry_slab allocation, so let's avoid unneeded error handling.

---
 fs/f2fs/segment.c | 5 -----
 1 file changed, 5 deletions(-)
fs/f2fs/segment.c +0 -5
index 0a4180f64291..51ceff797b97 100644
@@ -315,11 +315,6 @@ static int __f2fs_commit_atomic_write(struct inode *inode)
 
 			new = f2fs_kmem_cache_alloc(revoke_entry_slab, GFP_NOFS,
 							true, NULL);
-			if (!new) {
-				f2fs_put_dnode(&dn);
-				ret = -ENOMEM;
-				goto out;
-			}
 
 			ret = __replace_atomic_write_block(inode, index, blkaddr,
 							&new->old_addr, false);
Signature · 1 line
2.25.1