Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dave Chinner and committed by
Al Viro
4f8c19fd b0d40c92

-21
-21
fs/inode.c
··· 68 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 71 * Empty aops. Can be used for the cases where the user does not 83 72 * define any of the address_space operations. 84 73 */ ··· 531 542 spin_unlock(&inode_sb_list_lock); 532 543 533 544 dispose_list(&dispose); 534 - 535 - /* 536 - * Cycle through iprune_sem to make sure any inode that prune_icache_sb 537 - * moved off the list before we took the lock has been fully torn 538 - * down. 539 - */ 540 - down_write(&iprune_sem); 541 - up_write(&iprune_sem); 542 545 } 543 546 544 547 /** ··· 616 635 int nr_scanned; 617 636 unsigned long reap = 0; 618 637 619 - down_read(&iprune_sem); 620 638 spin_lock(&sb->s_inode_lru_lock); 621 639 for (nr_scanned = nr_to_scan; nr_scanned >= 0; nr_scanned--) { 622 640 struct inode *inode; ··· 691 711 spin_unlock(&sb->s_inode_lru_lock); 692 712 693 713 dispose_list(&freeable); 694 - up_read(&iprune_sem); 695 714 } 696 715 697 716 static void __wait_on_freeing_inode(struct inode *inode);