diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c index 05f4fa521325..990d284877a1 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -326,12 +326,11 @@ void address_space_init_once(struct address_space *mapping) | |||
326 | memset(mapping, 0, sizeof(*mapping)); | 326 | memset(mapping, 0, sizeof(*mapping)); |
327 | INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC); | 327 | INIT_RADIX_TREE(&mapping->page_tree, GFP_ATOMIC); |
328 | spin_lock_init(&mapping->tree_lock); | 328 | spin_lock_init(&mapping->tree_lock); |
329 | spin_lock_init(&mapping->i_mmap_lock); | 329 | mutex_init(&mapping->i_mmap_mutex); |
330 | INIT_LIST_HEAD(&mapping->private_list); | 330 | INIT_LIST_HEAD(&mapping->private_list); |
331 | spin_lock_init(&mapping->private_lock); | 331 | spin_lock_init(&mapping->private_lock); |
332 | INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap); | 332 | INIT_RAW_PRIO_TREE_ROOT(&mapping->i_mmap); |
333 | INIT_LIST_HEAD(&mapping->i_mmap_nonlinear); | 333 | INIT_LIST_HEAD(&mapping->i_mmap_nonlinear); |
334 | mutex_init(&mapping->unmap_mutex); | ||
335 | } | 334 | } |
336 | EXPORT_SYMBOL(address_space_init_once); | 335 | EXPORT_SYMBOL(address_space_init_once); |
337 | 336 | ||
@@ -752,8 +751,12 @@ static void prune_icache(int nr_to_scan) | |||
752 | * This function is passed the number of inodes to scan, and it returns the | 751 | * This function is passed the number of inodes to scan, and it returns the |
753 | * total number of remaining possibly-reclaimable inodes. | 752 | * total number of remaining possibly-reclaimable inodes. |
754 | */ | 753 | */ |
755 | static int shrink_icache_memory(struct shrinker *shrink, int nr, gfp_t gfp_mask) | 754 | static int shrink_icache_memory(struct shrinker *shrink, |
755 | struct shrink_control *sc) | ||
756 | { | 756 | { |
757 | int nr = sc->nr_to_scan; | ||
758 | gfp_t gfp_mask = sc->gfp_mask; | ||
759 | |||
757 | if (nr) { | 760 | if (nr) { |
758 | /* | 761 | /* |
759 | * Nasty deadlock avoidance. We may hold various FS locks, | 762 | * Nasty deadlock avoidance. We may hold various FS locks, |