From: Fabian Frederick <fabf@skynet.be>
To: Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>
Cc: Josef Bacik <jbacik@fb.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
fabf@skynet.be
Subject: [PATCH 1/1 linux-next] btrfs: kmap() can't fail
Date: Tue, 25 Apr 2017 20:11:02 +0200 [thread overview]
Message-ID: <20170425181102.2326-1-fabf@skynet.be> (raw)
Remove NULL test on kmap()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/btrfs/check-integrity.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index ab14c2e..496eb00 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -1668,14 +1668,8 @@ static int btrfsic_read_block(struct btrfsic_state *state,
dev_bytenr += (j - i) * PAGE_SIZE;
i = j;
}
- for (i = 0; i < num_pages; i++) {
+ for (i = 0; i < num_pages; i++)
block_ctx->datav[i] = kmap(block_ctx->pagev[i]);
- if (!block_ctx->datav[i]) {
- pr_info("btrfsic: kmap() failed (dev %s)!\n",
- block_ctx->dev->name);
- return -1;
- }
- }
return block_ctx->len;
}
--
2.9.3
next reply other threads:[~2017-04-25 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 18:11 Fabian Frederick [this message]
2017-05-02 15:46 ` [PATCH 1/1 linux-next] btrfs: kmap() can't fail David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170425181102.2326-1-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).