aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index a5f993a..e5a0515 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -245,10 +245,8 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
ret = pagecache_write_end(file, mapping, pos, size, copied,
page, fsdata);
- if (ret < 0)
+ if (ret < 0 || ret != copied)
goto fail;
- if (ret < copied)
- copied = ret;
if (unlikely(transfer_result))
goto fail;