Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'iomap-6.6-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull iomap fix from Darrick Wong:

- Fix a bug where a writev consisting of a bunch of sub-fsblock writes
where the last buffer address is invalid could lead to an infinite
loop

* tag 'iomap-6.6-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
iomap: fix short copy in iomap_write_iter()

+7 -3
+7 -3
fs/iomap/buffered-io.c
··· 881 881 size_t bytes; /* Bytes to write to folio */ 882 882 size_t copied; /* Bytes copied from user */ 883 883 884 + bytes = iov_iter_count(i); 885 + retry: 884 886 offset = pos & (chunk - 1); 885 - bytes = min(chunk - offset, iov_iter_count(i)); 887 + bytes = min(chunk - offset, bytes); 886 888 status = balance_dirty_pages_ratelimited_flags(mapping, 887 889 bdp_flags); 888 890 if (unlikely(status)) ··· 935 933 * halfway through, might be a race with munmap, 936 934 * might be severe memory pressure. 937 935 */ 938 - if (copied) 939 - bytes = copied; 940 936 if (chunk > PAGE_SIZE) 941 937 chunk /= 2; 938 + if (copied) { 939 + bytes = copied; 940 + goto retry; 941 + } 942 942 } else { 943 943 pos += status; 944 944 written += status;