serial/imx: add device tree probe support
[pandora-kernel.git] / fs / inode.c
index 1fdbb64..a48fa53 100644 (file)
@@ -37,7 +37,7 @@
  *   inode->i_sb->s_inode_lru, inode->i_lru
  * inode_sb_list_lock protects:
  *   sb->s_inodes, inode->i_sb_list
- * inode_wb_list_lock protects:
+ * bdi->wb.list_lock protects:
  *   bdi->wb.b_{dirty,io,more_io}, inode->i_wb_list
  * inode_hash_lock protects:
  *   inode_hashtable, inode->i_hash
@@ -48,7 +48,7 @@
  *   inode->i_lock
  *     inode->i_sb->s_inode_lru_lock
  *
- * inode_wb_list_lock
+ * bdi->wb.list_lock
  *   inode->i_lock
  *
  * inode_hash_lock
@@ -65,18 +65,6 @@ static struct hlist_head *inode_hashtable __read_mostly;
 static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
 
 __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
-__cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock);
-
-/*
- * iprune_sem provides exclusion between the icache shrinking and the
- * umount path.
- *
- * We don't actually need it to protect anything in the umount path,
- * but only need to cycle through it to make sure any inode that
- * prune_icache_sb took off the LRU list has been fully torn down by the
- * time we are past evict_inodes.
- */
-static DECLARE_RWSEM(iprune_sem);
 
 /*
  * Empty aops. Can be used for the cases where the user does not
@@ -179,8 +167,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
        mutex_init(&inode->i_mutex);
        lockdep_set_class(&inode->i_mutex, &sb->s_type->i_mutex_key);
 
-       init_rwsem(&inode->i_alloc_sem);
-       lockdep_set_class(&inode->i_alloc_sem, &sb->s_type->i_alloc_sem_key);
+       atomic_set(&inode->i_dio_count, 0);
 
        mapping->a_ops = &empty_aops;
        mapping->host = inode;
@@ -542,14 +529,6 @@ void evict_inodes(struct super_block *sb)
        spin_unlock(&inode_sb_list_lock);
 
        dispose_list(&dispose);
-
-       /*
-        * Cycle through iprune_sem to make sure any inode that prune_icache_sb
-        * moved off the list before we took the lock has been fully torn
-        * down.
-        */
-       down_write(&iprune_sem);
-       up_write(&iprune_sem);
 }
 
 /**
@@ -635,7 +614,6 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
        int nr_scanned;
        unsigned long reap = 0;
 
-       down_read(&iprune_sem);
        spin_lock(&sb->s_inode_lru_lock);
        for (nr_scanned = nr_to_scan; nr_scanned >= 0; nr_scanned--) {
                struct inode *inode;
@@ -711,7 +689,6 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)
        spin_unlock(&sb->s_inode_lru_lock);
 
        dispose_list(&freeable);
-       up_read(&iprune_sem);
 }
 
 static void __wait_on_freeing_inode(struct inode *inode);