linux-sg2042/fs/xfs/libxfs
Darrick J. Wong ea78d80866 xfs: track log done items directly in the deferred pending work item
Christoph reports slab corruption when a deferred refcount update
aborts during _defer_finish().  The cause of this was broken log item
state tracking in xfs_defer_pending -- upon an abort,
_defer_trans_abort() will call abort_intent on all intent items,
including the ones that have already had a done item attached.

This is incorrect because each intent item has 2 refcount: the first
is released when the intent item is committed to the log; and the
second is released when the _done_ item is committed to the log, or
by the intent creator if there is no done item.  In other words, once
we log the done item, responsibility for releasing the intent item's
second refcount is transferred to the done item and /must not/ be
performed by anything else.

The dfp_committed flag should have been tracking whether or not we had
a done item so that _defer_trans_abort could decide if it needs to
abort the intent item, but due to a thinko this was not the case.  Rip
it out and track the done item directly so that we do the right thing
w.r.t. intent item freeing.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-08-30 13:51:39 +10:00
..
xfs_alloc.c xfs: don't log the entire end of the AGF 2016-08-26 15:59:31 +10:00
xfs_alloc.h xfs: don't update rmapbt when fixing agfl 2016-08-03 12:19:53 +10:00
xfs_alloc_btree.c xfs: remove the get*keys and update_keys btree ops pointers 2016-08-03 12:22:12 +10:00
xfs_alloc_btree.h
xfs_attr.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_attr_leaf.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_attr_leaf.h xfs: make several functions static 2016-06-01 17:38:15 +10:00
xfs_attr_remote.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_attr_remote.h
xfs_attr_sf.h xfs: move struct xfs_attr_shortform to xfs_da_format.h 2016-02-08 15:00:01 +11:00
xfs_bit.c libxfs: Optimize the loop for xfs_bitmap_empty 2016-01-04 16:10:19 +11:00
xfs_bit.h
xfs_bmap.c xfs: propagate bmap updates to rmapbt 2016-08-03 12:16:05 +10:00
xfs_bmap.h xfs: add owner field to extent allocation and freeing 2016-08-03 11:33:42 +10:00
xfs_bmap_btree.c xfs: remove the get*keys and update_keys btree ops pointers 2016-08-03 12:22:12 +10:00
xfs_bmap_btree.h
xfs_btree.c xfs: simple btree query range should look right if LE lookup fails 2016-08-26 16:00:10 +10:00
xfs_btree.h xfs: remove the get*keys and update_keys btree ops pointers 2016-08-03 12:22:12 +10:00
xfs_cksum.h
xfs_da_btree.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_da_btree.h xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_da_format.c xfs: kill xfs_dir2_inou_t 2016-07-20 11:48:31 +10:00
xfs_da_format.h xfs: fix attr shortform structure alignment on cris 2016-08-03 10:59:42 +10:00
xfs_defer.c xfs: track log done items directly in the deferred pending work item 2016-08-30 13:51:39 +10:00
xfs_defer.h xfs: track log done items directly in the deferred pending work item 2016-08-30 13:51:39 +10:00
xfs_dir2.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_dir2.h xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_dir2_block.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_dir2_data.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_dir2_leaf.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_dir2_node.c xfs: always set rvalp in xfs_dir2_node_trim_free 2016-03-15 11:44:18 +11:00
xfs_dir2_priv.h xfs: move type conversion functions to xfs_dir.h 2014-12-04 09:43:17 +11:00
xfs_dir2_sf.c xfs: kill xfs_dir2_inou_t 2016-07-20 11:48:31 +10:00
xfs_dquot_buf.c xfs: handle dquot buffer readahead in log recovery correctly 2016-01-12 07:04:01 +11:00
xfs_format.h xfs: don't log the entire end of the AGF 2016-08-26 15:59:31 +10:00
xfs_fs.h xfs: add rmap btree geometry feature flag 2016-08-03 12:16:44 +10:00
xfs_ialloc.c xfs: add owner field to extent allocation and freeing 2016-08-03 11:33:42 +10:00
xfs_ialloc.h xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_ialloc_btree.c xfs: remove the get*keys and update_keys btree ops pointers 2016-08-03 12:22:12 +10:00
xfs_ialloc_btree.h xfs: allocate sparse inode chunks on full chunk allocation failure 2015-05-29 09:18:32 +10:00
xfs_inode_buf.c xfs: rework xfs_bmap_free callers to use xfs_defer_ops 2016-08-03 11:15:38 +10:00
xfs_inode_buf.h xfs: mode di_mode to vfs inode 2016-02-09 16:54:58 +11:00
xfs_inode_fork.c Merge branch 'xfs-4.7-inode-reclaim' into for-next 2016-05-20 10:34:00 +10:00
xfs_inode_fork.h xfs: factor out a helper to initialize a local format inode fork 2016-04-06 07:41:43 +10:00
xfs_log_format.h xfs: remove the extents array from the rmap update done log item 2016-08-03 12:28:43 +10:00
xfs_log_recover.h xfs: support a crc verification only log record pass 2016-01-04 15:55:10 +11:00
xfs_log_rlimit.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_quota_defs.h xfs: wire up Q_XGETNEXTQUOTA / get_nextdqblk 2016-02-08 11:27:38 +11:00
xfs_rmap.c xfs: propagate bmap updates to rmapbt 2016-08-03 12:16:05 +10:00
xfs_rmap.h xfs: propagate bmap updates to rmapbt 2016-08-03 12:16:05 +10:00
xfs_rmap_btree.c xfs: store rmapbt block count in the AGF 2016-08-17 08:31:49 +10:00
xfs_rmap_btree.h xfs: support overlapping intervals in the rmap btree 2016-08-03 11:40:56 +10:00
xfs_rtbitmap.c xfs: make several functions static 2016-06-01 17:38:15 +10:00
xfs_sb.c xfs: fix superblock inprogress check 2016-08-26 16:01:30 +10:00
xfs_sb.h xfs: remove unused function definitions 2016-02-08 14:58:07 +11:00
xfs_shared.h xfs: define the on-disk rmap btree format 2016-08-03 11:36:07 +10:00
xfs_symlink_remote.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_trans_resv.c xfs: rmap btree transaction reservations 2016-08-03 11:37:10 +10:00
xfs_trans_resv.h xfs: rmap btree transaction reservations 2016-08-03 11:37:10 +10:00
xfs_trans_space.h xfs: clean up XFS_MIN_FREELIST macros 2015-06-22 10:13:30 +10:00
xfs_types.h xfs: introduce rmap btree definitions 2016-08-03 11:30:32 +10:00