diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-07-08 00:14:43 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 20:47:40 -0400 |
commit | 4f8c19fdf3f97402b68f058b1c72a6c7166c9e59 (patch) | |
tree | 1e986c639955955f6191c46bcfa831e6bb466d60 /fs/inode.c | |
parent | b0d40c92adafde7c2d81203ce7c1c69275f41140 (diff) |
inode: remove iprune_sem
Now that we have per-sb shrinkers with a lifecycle that is a subset
of the superblock lifecycle and can reliably detect a filesystem
being unmounted, there is not longer any race condition for the
iprune_sem to protect against. Hence we can remove it.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/fs/inode.c b/fs/inode.c index 1fdbb64a952f..cf81baf1898a 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -68,17 +68,6 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock); | |||
68 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock); | 68 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock); |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * iprune_sem provides exclusion between the icache shrinking and the | ||
72 | * umount path. | ||
73 | * | ||
74 | * We don't actually need it to protect anything in the umount path, | ||
75 | * but only need to cycle through it to make sure any inode that | ||
76 | * prune_icache_sb took off the LRU list has been fully torn down by the | ||
77 | * time we are past evict_inodes. | ||
78 | */ | ||
79 | static DECLARE_RWSEM(iprune_sem); | ||
80 | |||
81 | /* | ||
82 | * Empty aops. Can be used for the cases where the user does not | 71 | * Empty aops. Can be used for the cases where the user does not |
83 | * define any of the address_space operations. | 72 | * define any of the address_space operations. |
84 | */ | 73 | */ |
@@ -542,14 +531,6 @@ void evict_inodes(struct super_block *sb) | |||
542 | spin_unlock(&inode_sb_list_lock); | 531 | spin_unlock(&inode_sb_list_lock); |
543 | 532 | ||
544 | dispose_list(&dispose); | 533 | dispose_list(&dispose); |
545 | |||
546 | /* | ||
547 | * Cycle through iprune_sem to make sure any inode that prune_icache_sb | ||
548 | * moved off the list before we took the lock has been fully torn | ||
549 | * down. | ||
550 | */ | ||
551 | down_write(&iprune_sem); | ||
552 | up_write(&iprune_sem); | ||
553 | } | 534 | } |
554 | 535 | ||
555 | /** | 536 | /** |
@@ -635,7 +616,6 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan) | |||
635 | int nr_scanned; | 616 | int nr_scanned; |
636 | unsigned long reap = 0; | 617 | unsigned long reap = 0; |
637 | 618 | ||
638 | down_read(&iprune_sem); | ||
639 | spin_lock(&sb->s_inode_lru_lock); | 619 | spin_lock(&sb->s_inode_lru_lock); |
640 | for (nr_scanned = nr_to_scan; nr_scanned >= 0; nr_scanned--) { | 620 | for (nr_scanned = nr_to_scan; nr_scanned >= 0; nr_scanned--) { |
641 | struct inode *inode; | 621 | struct inode *inode; |
@@ -711,7 +691,6 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan) | |||
711 | spin_unlock(&sb->s_inode_lru_lock); | 691 | spin_unlock(&sb->s_inode_lru_lock); |
712 | 692 | ||
713 | dispose_list(&freeable); | 693 | dispose_list(&freeable); |
714 | up_read(&iprune_sem); | ||
715 | } | 694 | } |
716 | 695 | ||
717 | static void __wait_on_freeing_inode(struct inode *inode); | 696 | static void __wait_on_freeing_inode(struct inode *inode); |