remarkable-linux/fs/xfs
Nathaniel W. Turner 6c06f072c2 xfs: copy li_lsn before dropping AIL lock
Access to log items on the AIL is generally protected by m_ail_lock;
this is particularly needed when we're getting or setting the 64-bit
li_lsn on a 32-bit platform.  This patch fixes a couple places where we
were accessing the log item after dropping the AIL lock on 32-bit
machines.

This can result in a partially-zeroed log->l_tail_lsn if
xfs_trans_ail_delete is racing with xfs_trans_ail_update, and in at
least some cases, this can leave the l_tail_lsn with a zero cycle
number, which means xlog_space_left will think the log is full (unless
CONFIG_XFS_DEBUG is set, in which case we'll trip an ASSERT), leading to
processes stuck forever in xlog_grant_log_space.

Thanks to Adrian VanderSpek for first spotting the race potential and to
Dave Chinner for debug assistance.

Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2009-11-17 10:26:49 -06:00
..
linux-2.6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs 2009-10-31 12:12:49 -07:00
quota xfs: fix double IRELE in xfs_dqrele_inode 2009-10-13 13:16:36 -05:00
support
Kconfig
Makefile
xfs.h
xfs_acl.h switch xfs to generic acl caching helpers 2009-06-24 08:17:07 -04:00
xfs_ag.h xfs: speed up free inode search 2009-09-01 12:45:48 -05:00
xfs_alloc.c un-static xfs_read_agf 2009-08-31 14:46:21 -05:00
xfs_alloc.h
xfs_alloc_btree.c
xfs_alloc_btree.h
xfs_arch.h
xfs_attr.c xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get 2009-08-12 01:08:01 -05:00
xfs_attr.h
xfs_attr_leaf.c
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_bit.c
xfs_bit.h
xfs_bmap.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap_btree.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_bmap_btree.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_btree_trace.c
xfs_btree_trace.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c xfs: switch to NOFS allocation under i_lock in xfs_da_buf_make 2009-08-12 01:07:14 -05:00
xfs_da_btree.h
xfs_dfrag.c xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_dfrag.h
xfs_dinode.h
xfs_dir2.c xfs: switch to NOFS allocation under i_lock in xfs_dir_cilookup_result 2009-08-12 01:07:23 -05:00
xfs_dir2.h
xfs_dir2_block.c
xfs_dir2_block.h
xfs_dir2_data.c
xfs_dir2_data.h
xfs_dir2_leaf.c fix readahead calculations in xfs_dir2_leaf_getdents() 2009-10-08 12:02:12 -05:00
xfs_dir2_leaf.h
xfs_dir2_node.c
xfs_dir2_node.h
xfs_dir2_sf.c
xfs_dir2_sf.h
xfs_dir2_trace.c
xfs_dir2_trace.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h
xfs_filestream.c
xfs_filestream.h
xfs_fs.h trivial: fix typo "for for" in multiple files 2009-09-21 15:14:54 +02:00
xfs_fsops.c xfs: avoid memory allocation under m_peraglock in growfs code 2009-08-12 01:06:51 -05:00
xfs_fsops.h
xfs_ialloc.c xfs: free temporary cursor in xfs_dialloc 2009-10-30 09:27:07 +01:00
xfs_ialloc.h xfs: rationalize xfs_inobt_lookup* 2009-09-01 12:45:39 -05:00
xfs_ialloc_btree.c
xfs_ialloc_btree.h
xfs_iget.c xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inode.c xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_inode.h xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_inode_item.c xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_inode_item.h xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_inum.h xfs: remove XFS_INO64_OFFSET 2009-08-31 14:46:22 -05:00
xfs_iomap.c
xfs_iomap.h
xfs_itable.c xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_itable.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_log.c xfs: fix spin_is_locked assert on uni-processor builds 2009-08-12 01:08:27 -05:00
xfs_log.h
xfs_log_priv.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_log_recover.c XFS bug in log recover with quota (bugzilla id 855) 2009-11-17 10:26:38 -06:00
xfs_log_recover.h
xfs_mount.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mount.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mru_cache.c xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_mru_cache.h xfs: add more statics & drop some unused functions 2009-08-31 14:46:20 -05:00
xfs_quota.h xfs: fix warnings with CONFIG_XFS_QUOTA disabled 2009-06-12 21:15:12 -05:00
xfs_refcache.h
xfs_rename.c
xfs_rtalloc.c
xfs_rtalloc.h
xfs_rw.c xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_rw.h xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_sb.h
xfs_trans.c Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus 2009-06-12 21:28:59 -05:00
xfs_trans.h xfs: merge fsync and O_SYNC handling 2009-09-01 12:45:57 -05:00
xfs_trans_ail.c xfs: copy li_lsn before dropping AIL lock 2009-11-17 10:26:49 -06:00
xfs_trans_buf.c fs/xfs: Correct redundant test 2009-08-31 14:46:22 -05:00
xfs_trans_extfree.c
xfs_trans_inode.c xfs: simplify xfs_trans_iget 2009-09-01 12:46:16 -05:00
xfs_trans_item.c
xfs_trans_priv.h
xfs_trans_space.h
xfs_types.h
xfs_utils.c
xfs_utils.h
xfs_vnodeops.c xfs: implement ->dirty_inode to fix timestamp handling 2009-10-08 12:00:03 -05:00
xfs_vnodeops.h