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

Pull xfs fixes from Carlos Maiolino:
"A couple race fixes found on the new healthmon mechanism, and another
flushing dquots during filesystem shutdown"

* tag 'xfs-fixes-7.0-rc4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: fix integer overflow in bmap intent sort comparator
xfs: fix undersized l_iclog_roundoff values
xfs: ensure dquot item is deleted from AIL only after log shutdown
xfs: remove redundant set null for ip->i_itemp
xfs: fix returned valued from xfs_defer_can_append
xfs: Remove redundant NULL check after __GFP_NOFAIL
xfs: fix race between healthmon unmount and read_iter
xfs: remove scratch field from struct xfs_gc_bio

+23 -19
+2 -6
fs/xfs/libxfs/xfs_da_btree.c
··· 2716 2716 * larger one that needs to be free by the caller. 2717 2717 */ 2718 2718 if (nirecs > 1) { 2719 - map = kzalloc(nirecs * sizeof(struct xfs_buf_map), 2720 - GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL); 2721 - if (!map) { 2722 - error = -ENOMEM; 2723 - goto out_free_irecs; 2724 - } 2719 + map = kcalloc(nirecs, sizeof(struct xfs_buf_map), 2720 + GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL); 2725 2721 *mapp = map; 2726 2722 } 2727 2723
+1 -1
fs/xfs/libxfs/xfs_defer.c
··· 809 809 810 810 /* Paused items cannot absorb more work */ 811 811 if (dfp->dfp_flags & XFS_DEFER_PAUSED) 812 - return NULL; 812 + return false; 813 813 814 814 /* Already full? */ 815 815 if (ops->max_items && dfp->dfp_count >= ops->max_items)
+1 -1
fs/xfs/xfs_bmap_item.c
··· 245 245 struct xfs_bmap_intent *ba = bi_entry(a); 246 246 struct xfs_bmap_intent *bb = bi_entry(b); 247 247 248 - return ba->bi_owner->i_ino - bb->bi_owner->i_ino; 248 + return cmp_int(ba->bi_owner->i_ino, bb->bi_owner->i_ino); 249 249 } 250 250 251 251 /* Log bmap updates in the intent item. */
+7 -1
fs/xfs/xfs_dquot.c
··· 1439 1439 return 0; 1440 1440 1441 1441 out_abort: 1442 + /* 1443 + * Shut down the log before removing the dquot item from the AIL. 1444 + * Otherwise, the log tail may advance past this item's LSN while 1445 + * log writes are still in progress, making these unflushed changes 1446 + * unrecoverable on the next mount. 1447 + */ 1448 + xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); 1442 1449 dqp->q_flags &= ~XFS_DQFLAG_DIRTY; 1443 1450 xfs_trans_ail_delete(lip, 0); 1444 - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); 1445 1451 xfs_dqfunlock(dqp); 1446 1452 return error; 1447 1453 }
+10 -7
fs/xfs/xfs_healthmon.c
··· 141 141 hm->mount_cookie = DETACHED_MOUNT_COOKIE; 142 142 spin_unlock(&xfs_healthmon_lock); 143 143 144 + /* 145 + * Wake up any readers that might remain. This can happen if unmount 146 + * races with the healthmon fd owner entering ->read_iter, having 147 + * already emptied the event queue. 148 + * 149 + * In the ->release case there shouldn't be any readers because the 150 + * only users of the waiter are read and poll. 151 + */ 152 + wake_up_all(&hm->wait); 153 + 144 154 trace_xfs_healthmon_detach(hm); 145 155 xfs_healthmon_put(hm); 146 156 } ··· 1037 1027 * process can create another health monitor file. 1038 1028 */ 1039 1029 xfs_healthmon_detach(hm); 1040 - 1041 - /* 1042 - * Wake up any readers that might be left. There shouldn't be any 1043 - * because the only users of the waiter are read and poll. 1044 - */ 1045 - wake_up_all(&hm->wait); 1046 - 1047 1030 xfs_healthmon_put(hm); 1048 1031 return 0; 1049 1032 }
-1
fs/xfs/xfs_icache.c
··· 159 159 ASSERT(!test_bit(XFS_LI_IN_AIL, 160 160 &ip->i_itemp->ili_item.li_flags)); 161 161 xfs_inode_item_destroy(ip); 162 - ip->i_itemp = NULL; 163 162 } 164 163 165 164 kmem_cache_free(xfs_inode_cache, ip);
+2
fs/xfs/xfs_log.c
··· 1357 1357 1358 1358 if (xfs_has_logv2(mp) && mp->m_sb.sb_logsunit > 1) 1359 1359 log->l_iclog_roundoff = mp->m_sb.sb_logsunit; 1360 + else if (mp->m_sb.sb_logsectsize > 0) 1361 + log->l_iclog_roundoff = mp->m_sb.sb_logsectsize; 1360 1362 else 1361 1363 log->l_iclog_roundoff = BBSIZE; 1362 1364
-2
fs/xfs/xfs_zone_gc.c
··· 96 96 */ 97 97 xfs_fsblock_t old_startblock; 98 98 xfs_daddr_t new_daddr; 99 - struct xfs_zone_scratch *scratch; 100 99 101 100 /* Are we writing to a sequential write required zone? */ 102 101 bool is_seq; ··· 778 779 ihold(VFS_I(chunk->ip)); 779 780 split_chunk->ip = chunk->ip; 780 781 split_chunk->is_seq = chunk->is_seq; 781 - split_chunk->scratch = chunk->scratch; 782 782 split_chunk->offset = chunk->offset; 783 783 split_chunk->len = split_len; 784 784 split_chunk->old_startblock = chunk->old_startblock;