Christoph Hellwig
bc990f5cb4
xfs: fix locking in xfs_iget_cache_hit
...
The locking in xfs_iget_cache_hit currently has numerous problems:
- we clear the reclaim tag without i_flags_lock which protects
modifications to it
- we call inode_init_always which can sleep with pag_ici_lock
held (this is oss.sgi.com BZ #819 )
- we acquire and drop i_flags_lock a lot and thus provide no
consistency between the various flags we set/clear under it
This patch fixes all that with a major revamp of the locking in
the function. The new version acquires i_flags_lock early and
only drops it once we need to call into inode_init_always or before
calling xfs_ilock.
This patch fixes a bug seen in the wild where we race modifying the
reclaim tag.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-08-17 01:23:48 -05:00
..
2009-08-17 01:23:48 -05:00
2009-06-10 17:07:47 +02:00
2009-03-30 10:21:31 +02:00
2009-06-10 17:07:47 +02:00
2009-06-10 17:07:47 +02:00
2009-06-24 08:17:07 -04:00
2009-06-08 15:35:14 +02:00
2009-01-19 14:45:55 +11:00
2008-10-30 17:14:34 +11:00
2009-03-16 08:29:46 +01:00
2009-03-16 08:29:46 +01:00
2009-06-10 17:07:47 +02:00
2009-03-29 19:26:46 +02:00
2009-01-09 15:46:44 +11:00
2008-07-28 16:58:35 +10:00
2009-08-12 01:08:01 -05:00
2008-08-13 16:03:35 +10:00
2008-08-13 15:41:12 +10:00
2009-01-09 15:53:54 +11:00
2009-06-08 15:33:32 +02:00
2009-01-19 14:45:55 +11:00
2009-08-12 01:06:59 -05:00
2009-03-29 19:26:46 +02:00
2008-10-30 16:58:50 +11:00
2008-10-30 16:58:50 +11:00
2009-08-12 01:08:10 -05:00
2009-03-29 09:55:42 +02:00
2008-12-22 17:52:58 +11:00
2009-08-12 01:07:14 -05:00
2009-03-29 09:55:42 +02:00
2009-06-01 22:59:29 -05:00
2008-12-02 17:08:01 +11:00
2009-03-29 09:51:14 +02:00
2009-03-29 09:51:08 +02:00
2008-07-28 16:58:36 +10:00
2009-03-29 09:55:42 +02:00
2009-03-29 09:51:08 +02:00
2009-03-29 09:55:42 +02:00
2009-03-29 09:51:08 +02:00
2008-12-01 11:37:35 +11:00
2008-07-28 16:58:37 +10:00
2009-08-12 01:07:23 -05:00
2008-07-28 16:58:40 +10:00
2008-08-23 12:14:12 -07:00
2008-10-30 17:53:24 +11:00
2008-12-22 18:02:01 +11:00
2008-12-22 18:02:01 +11:00
2008-10-30 17:39:58 +11:00
2009-01-22 14:07:31 +11:00
2009-06-08 15:35:48 +02:00
2009-06-08 15:32:59 +02:00
2009-08-12 01:06:51 -05:00
2009-01-09 16:54:42 -08:00
2009-03-29 09:55:42 +02:00
2009-02-09 08:37:14 +01:00
2009-03-29 09:55:42 +02:00
2009-01-19 14:45:55 +11:00
2009-08-17 01:23:48 -05:00
2008-12-01 11:38:08 +11:00
2009-01-22 14:07:31 +11:00
2009-08-12 01:08:21 -05:00
2009-08-07 14:38:34 -03:00
2009-06-10 17:07:47 +02:00
2009-04-06 18:49:12 +02:00
2009-03-29 09:55:42 +02:00
2008-12-02 17:16:03 +11:00
2009-03-16 08:24:13 +01:00
2009-06-08 15:33:21 +02:00
2009-08-12 01:08:27 -05:00
2009-03-16 08:19:29 +01:00
2009-06-08 15:35:12 +02:00
2009-06-08 15:33:32 +02:00
2008-07-28 16:59:25 +10:00
2009-06-12 21:15:12 -05:00
2009-06-08 15:33:32 +02:00
2009-02-04 09:33:58 +01:00
2009-03-29 09:55:42 +02:00
2009-06-10 17:07:47 +02:00
2009-01-19 14:45:55 +11:00
2009-01-19 14:45:55 +11:00
2009-03-29 09:55:42 +02:00
2008-10-30 17:39:58 +11:00
2008-12-04 15:39:23 +11:00
2009-03-29 09:55:42 +02:00
2008-10-30 17:39:58 +11:00
2009-02-09 08:37:14 +01:00
2009-06-12 21:28:59 -05:00
2009-03-29 09:55:42 +02:00
2009-02-09 08:37:39 +01:00
2009-06-08 15:33:32 +02:00
2008-08-13 16:13:45 +10:00
2009-08-12 01:07:53 -05:00
2009-06-10 17:07:47 +02:00
2008-10-30 16:55:13 +11:00