[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220525015634.3985529-1-chao@kernel.org>
Date: Wed, 25 May 2022 09:56:34 +0800
From: Chao Yu <chao@...nel.org>
To: jaegeuk@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Chao Yu <chao@...nel.org>,
Chao Yu <chao.yu@...o.com>
Subject: [PATCH] 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@...o.com>
---
fs/f2fs/segment.c | 5 -----
1 file changed, 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);
--
2.25.1
Powered by blists - more mailing lists