diff options
author | Eric Biggers <ebiggers@google.com> | 2019-12-31 12:14:56 -0600 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-01-17 16:48:42 -0800 |
commit | e8ce5749d781ec0ccdf03f4f174cc8f709c0057a (patch) | |
tree | fa5f397f49a45212b9b6601de66c970f6cdf8621 /fs/f2fs/data.c | |
parent | b06af2aff28b41099b0efd4f71c8bb4148bf29b5 (diff) |
f2fs: remove unneeded check for error allocating bio_post_read_ctx
Since allocating an object from a mempool never fails when
__GFP_DIRECT_RECLAIM (which is included in GFP_NOFS) is set, the check
for failure to allocate a bio_post_read_ctx is unnecessary. Remove it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b56437d4973d..63e0b814b567 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -937,11 +937,8 @@ static struct bio *f2fs_grab_read_bio(struct inode *inode, block_t blkaddr, post_read_steps |= 1 << STEP_VERITY; if (post_read_steps) { + /* Due to the mempool, this never fails. */ ctx = mempool_alloc(bio_post_read_ctx_pool, GFP_NOFS); - if (!ctx) { - bio_put(bio); - return ERR_PTR(-ENOMEM); - } ctx->bio = bio; ctx->sbi = sbi; ctx->enabled_steps = post_read_steps; |