]> err.no Git - linux-2.6/blobdiff - fs/inode.c
[PATCH] cond_resched() fix
[linux-2.6] / fs / inode.c
index 3a2446a27d2c29c9bd6172f8f4e17b9871453d3e..14a6c4147e4ecd68456ce14dad0ef259c08b59a0 100644 (file)
@@ -102,7 +102,7 @@ static kmem_cache_t * inode_cachep __read_mostly;
 
 static struct inode *alloc_inode(struct super_block *sb)
 {
-       static struct address_space_operations empty_aops;
+       static const struct address_space_operations empty_aops;
        static struct inode_operations empty_iops;
        static const struct file_operations empty_fops;
        struct inode *inode;
@@ -452,15 +452,14 @@ static void prune_icache(int nr_to_scan)
                nr_pruned++;
        }
        inodes_stat.nr_unused -= nr_pruned;
+       if (current_is_kswapd())
+               __count_vm_events(KSWAPD_INODESTEAL, reap);
+       else
+               __count_vm_events(PGINODESTEAL, reap);
        spin_unlock(&inode_lock);
 
        dispose_list(&freeable);
        mutex_unlock(&iprune_mutex);
-
-       if (current_is_kswapd())
-               mod_page_state(kswapd_inodesteal, reap);
-       else
-               mod_page_state(pginodesteal, reap);
 }
 
 /*