diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-03-17 14:47:24 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-03-24 23:38:11 +0100 |
commit | 46f3e0421ccb5474b5c006b0089b9dfd42534bb6 (patch) | |
tree | 8f661706809df3aa31b7bfb6f97260cab7067f27 /fs/gfs2 | |
parent | 124c458a401a2497f796e4f2d6cafac6edbea8e9 (diff) | |
download | linux-stable-46f3e0421ccb5474b5c006b0089b9dfd42534bb6.tar.gz linux-stable-46f3e0421ccb5474b5c006b0089b9dfd42534bb6.tar.bz2 linux-stable-46f3e0421ccb5474b5c006b0089b9dfd42534bb6.zip |
gfs2: Fix gfs2_file_buffered_write endless loop workaround
Since commit 554c577cee95b, gfs2_file_buffered_write() can accidentally
return a truncated iov_iter, which might confuse callers. Fix that.
Fixes: 554c577cee95b ("gfs2: Prevent endless loops in gfs2_file_buffered_write")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 44bb886eefce..19a038bc33bc 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -1084,6 +1084,7 @@ out_uninit: gfs2_holder_uninit(gh); if (statfs_gh) kfree(statfs_gh); + from->count = orig_count - read; return read ? read : ret; } |