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-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull iomap fixes from Darrick Wong:

- Handle a race between writing and shrinking block devices by
returning EIO

- Fix a typo in a comment

* tag 'iomap-6.6-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
iomap: Spelling s/preceeding/preceding/g
iomap: add a workaround for racy i_size updates on block devices

+11 -2
+10 -1
fs/buffer.c
··· 2058 2058 fallthrough; 2059 2059 case IOMAP_MAPPED: 2060 2060 if ((iomap->flags & IOMAP_F_NEW) || 2061 - offset >= i_size_read(inode)) 2061 + offset >= i_size_read(inode)) { 2062 + /* 2063 + * This can happen if truncating the block device races 2064 + * with the check in the caller as i_size updates on 2065 + * block devices aren't synchronized by i_rwsem for 2066 + * block devices. 2067 + */ 2068 + if (S_ISBLK(inode->i_mode)) 2069 + return -EIO; 2062 2070 set_buffer_new(bh); 2071 + } 2063 2072 bh->b_blocknr = (iomap->addr + offset - iomap->offset) >> 2064 2073 inode->i_blkbits; 2065 2074 set_buffer_mapped(bh);
+1 -1
fs/iomap/buffered-io.c
··· 1049 1049 1050 1050 /* 1051 1051 * Scan the data range passed to us for dirty page cache folios. If we find a 1052 - * dirty folio, punch out the preceeding range and update the offset from which 1052 + * dirty folio, punch out the preceding range and update the offset from which 1053 1053 * the next punch will start from. 1054 1054 * 1055 1055 * We can punch out storage reservations under clean pages because they either