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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}