Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630849

[PATCH 1/1 linux-next] btrfs: kmap() can't fail

From Fabian Frederick <fabf@skynet.be>
Newsgroups linux.kernel
Subject [PATCH 1/1 linux-next] btrfs: kmap() can't fail
Date 2017-04-25 20:20 +0200
Message-ID <tAdea-88w-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/1 linux-next] btrfs: kmap() can't fail Fabian Frederick <fabf@skynet.be> - 2017-04-25 20:20 +0200
  Re: [PATCH 1/1 linux-next] btrfs: kmap() can't fail David Sterba <dsterba@suse.cz> - 2017-05-02 17:50 +0200

csiph-web