diff options
author | Chao Yu <chao@kernel.org> | 2022-05-25 09:56:34 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-05-24 23:06:51 -0700 |
commit | 78901cfa44981d170fb5caae0d5421c97782b0d0 (patch) | |
tree | e35f5d7616f92ebb31731ab0e3813daeaa017049 /fs/f2fs | |
parent | 66d34fcbbe63ebd8584b792e0d741f6648100894 (diff) | |
download | linux-78901cfa44981d170fb5caae0d5421c97782b0d0.tar.bz2 |
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 <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0a4180f64291..51ceff797b97 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -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); |