mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
gfs2: Fix gfs2_file_buffered_write endless loop workaround
Since commit554c577cee
, gfs2_file_buffered_write() can accidentally return a truncated iov_iter, which might confuse callers. Fix that. Fixes:554c577cee
("gfs2: Prevent endless loops in gfs2_file_buffered_write") Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
124c458a40
commit
46f3e0421c
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue