aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/fs/inode.c b/fs/inode.c
index af8fd78d2099..801fe7f36280 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -26,7 +26,6 @@
26 * This is needed for the following functions: 26 * This is needed for the following functions:
27 * - inode_has_buffers 27 * - inode_has_buffers
28 * - invalidate_inode_buffers 28 * - invalidate_inode_buffers
29 * - fsync_bdev
30 * - invalidate_bdev 29 * - invalidate_bdev
31 * 30 *
32 * FIXME: remove all knowledge of the buffer layer from this file 31 * FIXME: remove all knowledge of the buffer layer from this file
@@ -332,14 +331,6 @@ static int invalidate_list(struct list_head *head, struct list_head *dispose)
332 return busy; 331 return busy;
333} 332}
334 333
335/*
336 * This is a two-stage process. First we collect all
337 * offending inodes onto the throw-away list, and in
338 * the second stage we actually dispose of them. This
339 * is because we don't want to sleep while messing
340 * with the global lists..
341 */
342
343/** 334/**
344 * invalidate_inodes - discard the inodes on a device 335 * invalidate_inodes - discard the inodes on a device
345 * @sb: superblock 336 * @sb: superblock
@@ -366,16 +357,11 @@ int invalidate_inodes(struct super_block * sb)
366 357
367EXPORT_SYMBOL(invalidate_inodes); 358EXPORT_SYMBOL(invalidate_inodes);
368 359
369int __invalidate_device(struct block_device *bdev, int do_sync) 360int __invalidate_device(struct block_device *bdev)
370{ 361{
371 struct super_block *sb; 362 struct super_block *sb = get_super(bdev);
372 int res; 363 int res = 0;
373 364
374 if (do_sync)
375 fsync_bdev(bdev);
376
377 res = 0;
378 sb = get_super(bdev);
379 if (sb) { 365 if (sb) {
380 /* 366 /*
381 * no need to lock the super, get_super holds the 367 * no need to lock the super, get_super holds the
@@ -390,7 +376,6 @@ int __invalidate_device(struct block_device *bdev, int do_sync)
390 invalidate_bdev(bdev, 0); 376 invalidate_bdev(bdev, 0);
391 return res; 377 return res;
392} 378}
393
394EXPORT_SYMBOL(__invalidate_device); 379EXPORT_SYMBOL(__invalidate_device);
395 380
396static int can_unuse(struct inode *inode) 381static int can_unuse(struct inode *inode)
@@ -1336,7 +1321,7 @@ void __init inode_init(unsigned long mempages)
1336 1321
1337 /* inode slab cache */ 1322 /* inode slab cache */
1338 inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode), 1323 inode_cachep = kmem_cache_create("inode_cache", sizeof(struct inode),
1339 0, SLAB_PANIC, init_once, NULL); 1324 0, SLAB_RECLAIM_ACCOUNT|SLAB_PANIC, init_once, NULL);
1340 set_shrinker(DEFAULT_SEEKS, shrink_icache_memory); 1325 set_shrinker(DEFAULT_SEEKS, shrink_icache_memory);
1341 1326
1342 /* Hash may have been set up in inode_init_early */ 1327 /* Hash may have been set up in inode_init_early */