aboutsummaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 45d583c33879..819ef3faf1bb 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -477,7 +477,8 @@ static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t
477 477
478 ret = filp->f_op->write_iter(&kiocb, &iter); 478 ret = filp->f_op->write_iter(&kiocb, &iter);
479 BUG_ON(ret == -EIOCBQUEUED); 479 BUG_ON(ret == -EIOCBQUEUED);
480 *ppos = kiocb.ki_pos; 480 if (ret > 0)
481 *ppos = kiocb.ki_pos;
481 return ret; 482 return ret;
482} 483}
483 484