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 'for-linus-v3.6-rc4' of git://oss.sgi.com/xfs/xfs

Pull xfs bugfixes from Ben Myers:
- fix uninitialised variable in xfs_rtbuf_get()
- unlock the AGI buffer when looping in xfs_dialloc
- check for possible overflow in xfs_ioc_trim

* tag 'for-linus-v3.6-rc4' of git://oss.sgi.com/xfs/xfs:
xfs: check for possible overflow in xfs_ioc_trim
xfs: unlock the AGI buffer when looping in xfs_dialloc
xfs: fix uninitialised variable in xfs_rtbuf_get()

+14 -11
+4 -2
fs/xfs/xfs_discard.c
··· 179 179 * used by the fstrim application. In the end it really doesn't 180 180 * matter as trimming blocks is an advisory interface. 181 181 */ 182 + if (range.start >= XFS_FSB_TO_B(mp, mp->m_sb.sb_dblocks) || 183 + range.minlen > XFS_FSB_TO_B(mp, XFS_ALLOC_AG_MAX_USABLE(mp))) 184 + return -XFS_ERROR(EINVAL); 185 + 182 186 start = BTOBB(range.start); 183 187 end = start + BTOBBT(range.len) - 1; 184 188 minlen = BTOBB(max_t(u64, granularity, range.minlen)); 185 189 186 - if (XFS_BB_TO_FSB(mp, start) >= mp->m_sb.sb_dblocks) 187 - return -XFS_ERROR(EINVAL); 188 190 if (end > XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks) - 1) 189 191 end = XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)- 1; 190 192
+9 -8
fs/xfs/xfs_ialloc.c
··· 962 962 if (!pag->pagi_freecount && !okalloc) 963 963 goto nextag; 964 964 965 + /* 966 + * Then read in the AGI buffer and recheck with the AGI buffer 967 + * lock held. 968 + */ 965 969 error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); 966 970 if (error) 967 971 goto out_error; 968 972 969 - /* 970 - * Once the AGI has been read in we have to recheck 971 - * pagi_freecount with the AGI buffer lock held. 972 - */ 973 973 if (pag->pagi_freecount) { 974 974 xfs_perag_put(pag); 975 975 goto out_alloc; 976 976 } 977 977 978 - if (!okalloc) { 979 - xfs_trans_brelse(tp, agbp); 980 - goto nextag; 981 - } 978 + if (!okalloc) 979 + goto nextag_relse_buffer; 980 + 982 981 983 982 error = xfs_ialloc_ag_alloc(tp, agbp, &ialloced); 984 983 if (error) { ··· 1006 1007 return 0; 1007 1008 } 1008 1009 1010 + nextag_relse_buffer: 1011 + xfs_trans_brelse(tp, agbp); 1009 1012 nextag: 1010 1013 xfs_perag_put(pag); 1011 1014 if (++agno == mp->m_sb.sb_agcount)
+1 -1
fs/xfs/xfs_rtalloc.c
··· 857 857 xfs_buf_t *bp; /* block buffer, result */ 858 858 xfs_inode_t *ip; /* bitmap or summary inode */ 859 859 xfs_bmbt_irec_t map; 860 - int nmap; 860 + int nmap = 1; 861 861 int error; /* error value */ 862 862 863 863 ip = issum ? mp->m_rsumip : mp->m_rbmip;