diff options
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 18 |
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 | ||