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 'fixes_for_v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fs fixes from Jan Kara:
"Three fixes that I'd still like to get to 5.18:

- add a missing sanity check in the fanotify FAN_RENAME feature
(added in 5.17, let's fix it before it gets wider usage in
userspace)

- udf fix for recently introduced filesystem corruption issue

- writeback fix for a race in inode list handling that can lead to
delayed writeback and possible dirty throttling stalls"

* tag 'fixes_for_v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
udf: Avoid using stale lengthOfImpUse
writeback: Avoid skipping inode writeback
fanotify: do not allow setting dirent events in mask of non-dir

+21 -4
+4
fs/fs-writeback.c
··· 1712 1712 */ 1713 1713 if (!(inode->i_state & I_DIRTY_ALL)) 1714 1714 inode_cgwb_move_to_attached(inode, wb); 1715 + else if (!(inode->i_state & I_SYNC_QUEUED) && 1716 + (inode->i_state & I_DIRTY)) 1717 + redirty_tail_locked(inode, wb); 1718 + 1715 1719 spin_unlock(&wb->list_lock); 1716 1720 inode_sync_complete(inode); 1717 1721 out:
+13
fs/notify/fanotify/fanotify_user.c
··· 1657 1657 else 1658 1658 mnt = path.mnt; 1659 1659 1660 + /* 1661 + * FAN_RENAME is not allowed on non-dir (for now). 1662 + * We shouldn't have allowed setting any dirent events in mask of 1663 + * non-dir, but because we always allowed it, error only if group 1664 + * was initialized with the new flag FAN_REPORT_TARGET_FID. 1665 + */ 1666 + ret = -ENOTDIR; 1667 + if (inode && !S_ISDIR(inode->i_mode) && 1668 + ((mask & FAN_RENAME) || 1669 + ((mask & FANOTIFY_DIRENT_EVENTS) && 1670 + FAN_GROUP_FLAG(group, FAN_REPORT_TARGET_FID)))) 1671 + goto path_put_and_out; 1672 + 1660 1673 /* Mask out FAN_EVENT_ON_CHILD flag for sb/mount/non-dir marks */ 1661 1674 if (mnt || !S_ISDIR(inode->i_mode)) { 1662 1675 mask &= ~FAN_EVENT_ON_CHILD;
+4 -4
fs/udf/namei.c
··· 75 75 76 76 if (fileident) { 77 77 if (adinicb || (offset + lfi < 0)) { 78 - memcpy(udf_get_fi_ident(sfi), fileident, lfi); 78 + memcpy(sfi->impUse + liu, fileident, lfi); 79 79 } else if (offset >= 0) { 80 80 memcpy(fibh->ebh->b_data + offset, fileident, lfi); 81 81 } else { 82 - memcpy(udf_get_fi_ident(sfi), fileident, -offset); 82 + memcpy(sfi->impUse + liu, fileident, -offset); 83 83 memcpy(fibh->ebh->b_data, fileident - offset, 84 84 lfi + offset); 85 85 } ··· 88 88 offset += lfi; 89 89 90 90 if (adinicb || (offset + padlen < 0)) { 91 - memset(udf_get_fi_ident(sfi) + lfi, 0x00, padlen); 91 + memset(sfi->impUse + liu + lfi, 0x00, padlen); 92 92 } else if (offset >= 0) { 93 93 memset(fibh->ebh->b_data + offset, 0x00, padlen); 94 94 } else { 95 - memset(udf_get_fi_ident(sfi) + lfi, 0x00, -offset); 95 + memset(sfi->impUse + liu + lfi, 0x00, -offset); 96 96 memset(fibh->ebh->b_data, 0x00, padlen + offset); 97 97 } 98 98