summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/check-integrity.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2017-04-25 20:11:02 +0200
committerDavid Sterba <dsterba@suse.com>2017-06-19 18:25:57 +0200
commit977ec79271fb6dfa0f853ea5aa3c80d3202893ee (patch)
tree742ec4c2b856697b91fa9de7cedfc7edf1475816 /fs/btrfs/check-integrity.c
parent41f1830f5a7af77cf5c86359aba3cbd706687e52 (diff)
downloadlinux-977ec79271fb6dfa0f853ea5aa3c80d3202893ee.tar.bz2
btrfs: kmap() can't fail
Remove NULL test on kmap() as it will always return a valid pointer. Signed-off-by: Fabian Frederick <fabf@skynet.be> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/check-integrity.c')
-rw-r--r--fs/btrfs/check-integrity.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index ab14c2e635ca..496eb009c41d 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;
}