diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 8345d6d3436a..182b21825255 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2791,13 +2791,8 @@ ssize_t generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from) ret = __generic_file_write_iter(iocb, from); inode_unlock(inode); - if (ret > 0) { - ssize_t err; - - err = generic_write_sync(iocb, iocb->ki_pos - ret, ret); - if (err < 0) - ret = err; - } + if (ret > 0) + ret = generic_write_sync(iocb, ret); return ret; } EXPORT_SYMBOL(generic_file_write_iter); |