File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2716,12 +2716,8 @@ xfs_dabuf_map(
27162716 * larger one that needs to be free by the caller.
27172717 */
27182718 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 );
27252721 * mapp = map ;
27262722 }
27272723
Original file line number Diff line number Diff line change @@ -809,7 +809,7 @@ xfs_defer_can_append(
809809
810810 /* Paused items cannot absorb more work */
811811 if (dfp -> dfp_flags & XFS_DEFER_PAUSED )
812- return NULL ;
812+ return false ;
813813
814814 /* Already full? */
815815 if (ops -> max_items && dfp -> dfp_count >= ops -> max_items )
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ xfs_bmap_update_diff_items(
245245 struct xfs_bmap_intent * ba = bi_entry (a );
246246 struct xfs_bmap_intent * bb = bi_entry (b );
247247
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 ) ;
249249}
250250
251251/* Log bmap updates in the intent item. */
Original file line number Diff line number Diff line change @@ -1439,9 +1439,15 @@ xfs_qm_dqflush(
14391439 return 0 ;
14401440
14411441out_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 );
14421449 dqp -> q_flags &= ~XFS_DQFLAG_DIRTY ;
14431450 xfs_trans_ail_delete (lip , 0 );
1444- xfs_force_shutdown (mp , SHUTDOWN_CORRUPT_INCORE );
14451451 xfs_dqfunlock (dqp );
14461452 return error ;
14471453}
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ xfs_healthmon_detach(
141141 hm -> mount_cookie = DETACHED_MOUNT_COOKIE ;
142142 spin_unlock (& xfs_healthmon_lock );
143143
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+
144154 trace_xfs_healthmon_detach (hm );
145155 xfs_healthmon_put (hm );
146156}
@@ -1027,13 +1037,6 @@ xfs_healthmon_release(
10271037 * process can create another health monitor file.
10281038 */
10291039 xfs_healthmon_detach (hm );
1030-
1031- /*
1032- * Wake up any readers that might be left. There shouldn't be any
1033- * because the only users of the waiter are read and poll.
1034- */
1035- wake_up_all (& hm -> wait );
1036-
10371040 xfs_healthmon_put (hm );
10381041 return 0 ;
10391042}
Original file line number Diff line number Diff line change @@ -159,7 +159,6 @@ xfs_inode_free_callback(
159159 ASSERT (!test_bit (XFS_LI_IN_AIL ,
160160 & ip -> i_itemp -> ili_item .li_flags ));
161161 xfs_inode_item_destroy (ip );
162- ip -> i_itemp = NULL ;
163162 }
164163
165164 kmem_cache_free (xfs_inode_cache , ip );
Original file line number Diff line number Diff line change @@ -1357,6 +1357,8 @@ xlog_alloc_log(
13571357
13581358 if (xfs_has_logv2 (mp ) && mp -> m_sb .sb_logsunit > 1 )
13591359 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 ;
13601362 else
13611363 log -> l_iclog_roundoff = BBSIZE ;
13621364
Original file line number Diff line number Diff line change @@ -96,7 +96,6 @@ struct xfs_gc_bio {
9696 */
9797 xfs_fsblock_t old_startblock ;
9898 xfs_daddr_t new_daddr ;
99- struct xfs_zone_scratch * scratch ;
10099
101100 /* Are we writing to a sequential write required zone? */
102101 bool is_seq ;
@@ -779,7 +778,6 @@ xfs_zone_gc_split_write(
779778 ihold (VFS_I (chunk -> ip ));
780779 split_chunk -> ip = chunk -> ip ;
781780 split_chunk -> is_seq = chunk -> is_seq ;
782- split_chunk -> scratch = chunk -> scratch ;
783781 split_chunk -> offset = chunk -> offset ;
784782 split_chunk -> len = split_len ;
785783 split_chunk -> old_startblock = chunk -> old_startblock ;
You can’t perform that action at this time.
0 commit comments