aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-07-04 11:13:33 -0400
committerBen Myers <bpm@sgi.com>2012-07-29 17:23:51 -0400
commit4f59af758f9092bc7b266ca919ce6067170e5172 (patch)
tree1d406a2762a20ee23bf2acd41202ff0e8b350cc8 /fs/xfs/xfs_super.c
parent5a15322da1a51ad8f3af1962de355885b6c606f2 (diff)
xfs: remove iolock lock classes
Content-Disposition: inline; filename=xfs-remove-iolock-classes Now that we never take the iolock during inode reclaim we don't need to play games with lock classes. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Rich Johnston <rjohnston@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index cb2deb13b063..bdaf4cb9f4a2 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -874,6 +874,8 @@ xfs_fs_evict_inode(
874{ 874{
875 xfs_inode_t *ip = XFS_I(inode); 875 xfs_inode_t *ip = XFS_I(inode);
876 876
877 ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
878
877 trace_xfs_evict_inode(ip); 879 trace_xfs_evict_inode(ip);
878 880
879 truncate_inode_pages(&inode->i_data, 0); 881 truncate_inode_pages(&inode->i_data, 0);
@@ -882,22 +884,6 @@ xfs_fs_evict_inode(
882 XFS_STATS_INC(vn_remove); 884 XFS_STATS_INC(vn_remove);
883 XFS_STATS_DEC(vn_active); 885 XFS_STATS_DEC(vn_active);
884 886
885 /*
886 * The iolock is used by the file system to coordinate reads,
887 * writes, and block truncates. Up to this point the lock
888 * protected concurrent accesses by users of the inode. But
889 * from here forward we're doing some final processing of the
890 * inode because we're done with it, and although we reuse the
891 * iolock for protection it is really a distinct lock class
892 * (in the lockdep sense) from before. To keep lockdep happy
893 * (and basically indicate what we are doing), we explicitly
894 * re-init the iolock here.
895 */
896 ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
897 mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
898 lockdep_set_class_and_name(&ip->i_iolock.mr_lock,
899 &xfs_iolock_reclaimable, "xfs_iolock_reclaimable");
900
901 xfs_inactive(ip); 887 xfs_inactive(ip);
902} 888}
903 889