\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmJ9O8cACgkQnJ2qBz9k QNk2sQf/amL1My1giNxtKwWJsHxljHqQH3W695mH1Q4fs1V9zKLbRv+ZLCcgIUBq qUq1EvOT5aUfLugKh1St6WyrfZwqgSWILHYeLhB8WS08roqGrWNB09c+ik2YW1Fz xGsLhwc9CBOn6A79+woN33kRUAyWH+TTDt7rr4ongAwGDPEpmmbTnbDvDY7xgVh/ AOXg75x5AhwVg/DxiLRPhaXk9ME8OT1Sc8mKVfboQsT/yz6rRHZCoUJwiVAXPNrN rG4pqNn+ncrvR1/tMQENWbSp+nIFN5PG5RzKf71sQrSfn2Voo6Bz8zoHYn7EulTT 3uNfXgR6aqOB17b5ptAOCCcjiWrBEQ== =//1B -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
c37dba6ae4
@ -1712,6 +1712,10 @@ static int writeback_single_inode(struct inode *inode,
|
||||
*/
|
||||
if (!(inode->i_state & I_DIRTY_ALL))
|
||||
inode_cgwb_move_to_attached(inode, wb);
|
||||
else if (!(inode->i_state & I_SYNC_QUEUED) &&
|
||||
(inode->i_state & I_DIRTY))
|
||||
redirty_tail_locked(inode, wb);
|
||||
|
||||
spin_unlock(&wb->list_lock);
|
||||
inode_sync_complete(inode);
|
||||
out:
|
||||
|
@ -1657,6 +1657,19 @@ static int do_fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask,
|
||||
else
|
||||
mnt = path.mnt;
|
||||
|
||||
/*
|
||||
* FAN_RENAME is not allowed on non-dir (for now).
|
||||
* We shouldn't have allowed setting any dirent events in mask of
|
||||
* non-dir, but because we always allowed it, error only if group
|
||||
* was initialized with the new flag FAN_REPORT_TARGET_FID.
|
||||
*/
|
||||
ret = -ENOTDIR;
|
||||
if (inode && !S_ISDIR(inode->i_mode) &&
|
||||
((mask & FAN_RENAME) ||
|
||||
((mask & FANOTIFY_DIRENT_EVENTS) &&
|
||||
FAN_GROUP_FLAG(group, FAN_REPORT_TARGET_FID))))
|
||||
goto path_put_and_out;
|
||||
|
||||
/* Mask out FAN_EVENT_ON_CHILD flag for sb/mount/non-dir marks */
|
||||
if (mnt || !S_ISDIR(inode->i_mode)) {
|
||||
mask &= ~FAN_EVENT_ON_CHILD;
|
||||
|
@ -75,11 +75,11 @@ int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi,
|
||||
|
||||
if (fileident) {
|
||||
if (adinicb || (offset + lfi < 0)) {
|
||||
memcpy(udf_get_fi_ident(sfi), fileident, lfi);
|
||||
memcpy(sfi->impUse + liu, fileident, lfi);
|
||||
} else if (offset >= 0) {
|
||||
memcpy(fibh->ebh->b_data + offset, fileident, lfi);
|
||||
} else {
|
||||
memcpy(udf_get_fi_ident(sfi), fileident, -offset);
|
||||
memcpy(sfi->impUse + liu, fileident, -offset);
|
||||
memcpy(fibh->ebh->b_data, fileident - offset,
|
||||
lfi + offset);
|
||||
}
|
||||
@ -88,11 +88,11 @@ int udf_write_fi(struct inode *inode, struct fileIdentDesc *cfi,
|
||||
offset += lfi;
|
||||
|
||||
if (adinicb || (offset + padlen < 0)) {
|
||||
memset(udf_get_fi_ident(sfi) + lfi, 0x00, padlen);
|
||||
memset(sfi->impUse + liu + lfi, 0x00, padlen);
|
||||
} else if (offset >= 0) {
|
||||
memset(fibh->ebh->b_data + offset, 0x00, padlen);
|
||||
} else {
|
||||
memset(udf_get_fi_ident(sfi) + lfi, 0x00, -offset);
|
||||
memset(sfi->impUse + liu + lfi, 0x00, -offset);
|
||||
memset(fibh->ebh->b_data, 0x00, padlen + offset);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user