Commit 46f3e042 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

gfs2: Fix gfs2_file_buffered_write endless loop workaround

Since commit 554c577c, gfs2_file_buffered_write() can accidentally
return a truncated iov_iter, which might confuse callers.  Fix that.

Fixes: 554c577c ("gfs2: Prevent endless loops in gfs2_file_buffered_write")
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 124c458a
......@@ -1084,6 +1084,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
gfs2_holder_uninit(gh);
if (statfs_gh)
kfree(statfs_gh);
from->count = orig_count - read;
return read ? read : ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment