From: David Howells <dhowells@redhat.com>
To: axboe@kernel.dk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
dhowells@redhat.com
Subject: [PATCH 09/18] [PATCH] BLOCK: Move __invalidate_device() to block_dev.c [try #3]
Date: Fri, 25 Aug 2006 15:49:35 +0100 [thread overview]
Message-ID: <20060825144935.30722.78154.stgit@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060825144916.30722.90944.stgit@warthog.cambridge.redhat.com>
From: David Howells <dhowells@redhat.com>
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>
---
fs/block_dev.c | 21 +++++++++++++++++++++
fs/inode.c | 21 ---------------------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 8debde8..ba26d3c 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1306,3 +1306,24 @@ void close_bdev_excl(struct block_device
}
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);
diff --git a/fs/inode.c b/fs/inode.c
index 0bf9f04..6426bb0 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -363,27 +363,6 @@ int invalidate_inodes(struct super_block
}
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)
{
next prev parent reply other threads:[~2006-08-25 14:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 14:49 [PATCH 00/18] BLOCK: Permit block layer to be disabled [try #3] David Howells
2006-08-25 14:49 ` [PATCH 01/18] [PATCH] BLOCK: Move functions out of buffer code " David Howells
2006-08-25 14:49 ` [PATCH 02/18] [PATCH] BLOCK: Remove duplicate declaration of exit_io_context() " David Howells
2006-08-25 14:49 ` [PATCH 03/18] [PATCH] BLOCK: Stop fallback_migrate_page() from using page_has_buffers() " David Howells
2006-08-25 14:49 ` [PATCH 04/18] [PATCH] BLOCK: Separate the bounce buffering code from the highmem code " David Howells
2006-08-25 14:49 ` [PATCH 05/18] [PATCH] BLOCK: Don't call block_sync_page() from AFS " David Howells
2006-08-25 14:49 ` [PATCH 06/18] [PATCH] BLOCK: Move bdev_cache_init() declaration to headerfile " David Howells
2006-08-25 14:49 ` [PATCH 07/18] [PATCH] BLOCK: Remove dependence on existence of blockdev_superblock " David Howells
2006-08-25 14:49 ` [PATCH 08/18] [PATCH] BLOCK: Dissociate generic_writepages() from mpage stuff " David Howells
2006-08-25 14:49 ` David Howells [this message]
2006-08-25 14:49 ` [PATCH 10/18] [PATCH] BLOCK: Move the loop device ioctl compat stuff to the loop driver " David Howells
2006-08-25 14:49 ` [PATCH 11/18] [PATCH] BLOCK: Move common FS-specific ioctls to linux/fs.h " David Howells
2006-08-25 14:49 ` [PATCH 12/18] [PATCH] BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver " David Howells
2006-08-25 14:49 ` [PATCH 13/18] [PATCH] BLOCK: Move the Ext2 device ioctl compat stuff to the Ext2 " David Howells
2006-08-25 14:49 ` [PATCH 14/18] [PATCH] BLOCK: Move the Ext3 device ioctl compat stuff to the Ext3 " David Howells
2006-08-25 14:49 ` [PATCH 15/18] [PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos " David Howells
2006-08-25 14:49 ` [PATCH 16/18] [PATCH] BLOCK: Remove no-longer necessary linux/mpage.h inclusions " David Howells
2006-08-25 14:49 ` [PATCH 17/18] [PATCH] BLOCK: Remove no-longer necessary linux/buffer_head.h " David Howells
2006-08-25 14:49 ` [PATCH 18/18] [PATCH] BLOCK: Make it possible to disable the block layer " David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060825144935.30722.78154.stgit@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).