Skip to content

Commit 46f3e04

Browse files
author
Andreas Gruenbacher
committed
gfs2: Fix gfs2_file_buffered_write endless loop workaround
Since commit 554c577, gfs2_file_buffered_write() can accidentally return a truncated iov_iter, which might confuse callers. Fix that. Fixes: 554c577 ("gfs2: Prevent endless loops in gfs2_file_buffered_write") Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 124c458 commit 46f3e04

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/gfs2/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
10841084
gfs2_holder_uninit(gh);
10851085
if (statfs_gh)
10861086
kfree(statfs_gh);
1087+
from->count = orig_count - read;
10871088
return read ? read : ret;
10881089
}
10891090

0 commit comments

Comments
 (0)