diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 570cd44fe91b..e9813bd7d556 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -5744,6 +5744,10 @@ static void btrfs_endio_direct_read(struct bio *bio, int err) | |||
5744 | 5744 | ||
5745 | kfree(dip->csums); | 5745 | kfree(dip->csums); |
5746 | kfree(dip); | 5746 | kfree(dip); |
5747 | |||
5748 | /* If we had a csum failure make sure to clear the uptodate flag */ | ||
5749 | if (err) | ||
5750 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | ||
5747 | dio_end_io(bio, err); | 5751 | dio_end_io(bio, err); |
5748 | } | 5752 | } |
5749 | 5753 | ||
@@ -5845,6 +5849,10 @@ out_done: | |||
5845 | 5849 | ||
5846 | kfree(dip->csums); | 5850 | kfree(dip->csums); |
5847 | kfree(dip); | 5851 | kfree(dip); |
5852 | |||
5853 | /* If we had an error make sure to clear the uptodate flag */ | ||
5854 | if (err) | ||
5855 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | ||
5848 | dio_end_io(bio, err); | 5856 | dio_end_io(bio, err); |
5849 | } | 5857 | } |
5850 | 5858 | ||