]> err.no Git - linux-2.6/commitdiff
[PATCH] BLOCK: Move __invalidate_device() to block_dev.c [try #6]
authorDavid Howells <dhowells@redhat.com>
Tue, 29 Aug 2006 18:06:11 +0000 (19:06 +0100)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Sat, 30 Sep 2006 18:52:27 +0000 (20:52 +0200)
Move __invalidate_device() from fs/inode.c to fs/block_dev.c so that it can
more easily be disabled when the block layer is disabled.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
fs/inode.c

index 335c38bb86eb1ed97f06e0edd02492e77edd8a9b..0c361ea7e5a6e13811da039c8e235b0acb670340 100644 (file)
@@ -1315,3 +1315,24 @@ void close_bdev_excl(struct block_device *bdev)
 }
 
 EXPORT_SYMBOL(close_bdev_excl);
+
+int __invalidate_device(struct block_device *bdev)
+{
+       struct super_block *sb = get_super(bdev);
+       int res = 0;
+
+       if (sb) {
+               /*
+                * no need to lock the super, get_super holds the
+                * read mutex so the filesystem cannot go away
+                * under us (->put_super runs with the write lock
+                * hold).
+                */
+               shrink_dcache_sb(sb);
+               res = invalidate_inodes(sb);
+               drop_super(sb);
+       }
+       invalidate_bdev(bdev, 0);
+       return res;
+}
+EXPORT_SYMBOL(__invalidate_device);
index abf77471e6c4a68701421dc6df6994de6e7000eb..ada7643104e14dee4bcc8a5dc5bd87b7398aad5f 100644 (file)
@@ -362,27 +362,6 @@ int invalidate_inodes(struct super_block * sb)
 }
 
 EXPORT_SYMBOL(invalidate_inodes);
-int __invalidate_device(struct block_device *bdev)
-{
-       struct super_block *sb = get_super(bdev);
-       int res = 0;
-
-       if (sb) {
-               /*
-                * no need to lock the super, get_super holds the
-                * read mutex so the filesystem cannot go away
-                * under us (->put_super runs with the write lock
-                * hold).
-                */
-               shrink_dcache_sb(sb);
-               res = invalidate_inodes(sb);
-               drop_super(sb);
-       }
-       invalidate_bdev(bdev, 0);
-       return res;
-}
-EXPORT_SYMBOL(__invalidate_device);
 
 static int can_unuse(struct inode *inode)
 {