Skip to contentSkip to conversation

fscrypt: remove redundant bi_status check

PATCH Applied Eric Biggers 1 participant 2 messages Dec 9, 2019 – Jan 3, 2020 fscrypt: file system level encryption support

lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 fscrypt: remove redundant bi_status check

From: Eric Biggers <[email protected]>

submit_bio_wait() already returns bi_status translated to an errno. So the additional check of bi_status is redundant and can be removed.

---
 fs/crypto/bio.c | 2 --
 1 file changed, 2 deletions(-)
fs/crypto/bio.c +0 -2
index 1f4b8a2770606..b88d417e186e5 100644
@@ -77,8 +77,6 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
 			goto errout;
 		}
 		err = submit_bio_wait(bio);
-		if (err == 0 && bio->bi_status)
-			err = -EIO;
 		bio_put(bio);
 		if (err)
 			goto errout;
Signature · 1 line
2.24.0.393.g34dc348eaf-goog
author maintainer Applied
#1 lore raw
Quoted 26 lines · Eric Biggers

From: Eric Biggers <[email protected]>

submit_bio_wait() already returns bi_status translated to an errno. So the additional check of bi_status is redundant and can be removed.

---
 fs/crypto/bio.c | 2 --
 1 file changed, 2 deletions(-)
fs/crypto/bio.c +0 -2
index 1f4b8a2770606..b88d417e186e5 100644
@@ -77,8 +77,6 @@ int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
 			goto errout;
 		}
 		err = submit_bio_wait(bio);
-		if (err == 0 && bio->bi_status)
-			err = -EIO;
 		bio_put(bio);
 		if (err)
 			goto errout;
Signature · 1 line
2.24.0.393.g34dc348eaf-goog

Applied to fscrypt.git#master for 5.6.

- Eric