Skip to content

Commit 78901cf

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 66d34fc commit 78901cf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/f2fs/segment.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,6 @@ static int __f2fs_commit_atomic_write(struct inode *inode)
315315

316316
new = f2fs_kmem_cache_alloc(revoke_entry_slab, GFP_NOFS,
317317
true, NULL);
318-
if (!new) {
319-
f2fs_put_dnode(&dn);
320-
ret = -ENOMEM;
321-
goto out;
322-
}
323318

324319
ret = __replace_atomic_write_block(inode, index, blkaddr,
325320
&new->old_addr, false);

0 commit comments

Comments
 (0)