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

Pull xfs fixes from Darrick Wong:

- Fix some uninitialized variable errors

- Fix an incorrect check in metadata verifiers

* tag 'xfs-4.18-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: properly handle free inodes in extent hint validators
xfs: Initialize variables in xfs_alloc_get_rec before using them

+7 -4
+3 -2
fs/xfs/libxfs/xfs_alloc.c
··· 223 223 error = xfs_btree_get_rec(cur, &rec, stat); 224 224 if (error || !(*stat)) 225 225 return error; 226 - if (rec->alloc.ar_blockcount == 0) 227 - goto out_bad_rec; 228 226 229 227 *bno = be32_to_cpu(rec->alloc.ar_startblock); 230 228 *len = be32_to_cpu(rec->alloc.ar_blockcount); 229 + 230 + if (*len == 0) 231 + goto out_bad_rec; 231 232 232 233 /* check for valid extent range, including overflow */ 233 234 if (!xfs_verify_agbno(mp, agno, *bno))
+4 -2
fs/xfs/libxfs/xfs_inode_buf.c
··· 731 731 if ((hint_flag || inherit_flag) && extsize == 0) 732 732 return __this_address; 733 733 734 - if (!(hint_flag || inherit_flag) && extsize != 0) 734 + /* free inodes get flags set to zero but extsize remains */ 735 + if (mode && !(hint_flag || inherit_flag) && extsize != 0) 735 736 return __this_address; 736 737 737 738 if (extsize_bytes % blocksize_bytes) ··· 778 777 if (hint_flag && cowextsize == 0) 779 778 return __this_address; 780 779 781 - if (!hint_flag && cowextsize != 0) 780 + /* free inodes get flags set to zero but cowextsize remains */ 781 + if (mode && !hint_flag && cowextsize != 0) 782 782 return __this_address; 783 783 784 784 if (hint_flag && rt_flag)