From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Subject: [PATCH] block: use I_BDEV to get _bdev_ from _inode_
Date: Tue, 15 May 2012 09:14:43 +0800 [thread overview]
Message-ID: <1337044483-4376-1-git-send-email-yuanhan.liu@linux.intel.com> (raw)
Use defined I_BDEV function to get _bdev_ from _inode_.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
fs/block_dev.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index e08f6a20..acc1e30 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -483,7 +483,7 @@ static inline void __bd_forget(struct inode *inode)
static void bdev_evict_inode(struct inode *inode)
{
- struct block_device *bdev = &BDEV_I(inode)->bdev;
+ struct block_device *bdev = I_BDEV(inode);
struct list_head *p;
truncate_inode_pages(&inode->i_data, 0);
invalidate_inode_buffers(inode); /* is it needed here? */
@@ -548,12 +548,12 @@ static inline unsigned long hash(dev_t dev)
static int bdev_test(struct inode *inode, void *data)
{
- return BDEV_I(inode)->bdev.bd_dev == *(dev_t *)data;
+ return I_BDEV(inode)->bd_dev == *(dev_t *)data;
}
static int bdev_set(struct inode *inode, void *data)
{
- BDEV_I(inode)->bdev.bd_dev = *(dev_t *)data;
+ I_BDEV(inode)->bd_dev = *(dev_t *)data;
return 0;
}
@@ -570,7 +570,7 @@ struct block_device *bdget(dev_t dev)
if (!inode)
return NULL;
- bdev = &BDEV_I(inode)->bdev;
+ bdev = I_BDEV(inode);
if (inode->i_state & I_NEW) {
bdev->bd_contains = NULL;
@@ -1600,7 +1600,7 @@ EXPORT_SYMBOL_GPL(blkdev_aio_write);
*/
static int blkdev_releasepage(struct page *page, gfp_t wait)
{
- struct super_block *super = BDEV_I(page->mapping->host)->bdev.bd_super;
+ struct super_block *super = I_BDEV(page->mapping->host)->bd_super;
if (super && super->s_op->bdev_try_to_free_page)
return super->s_op->bdev_try_to_free_page(super, page, wait);
--
1.7.7.6
reply other threads:[~2012-05-15 1:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1337044483-4376-1-git-send-email-yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--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
all inboxes | Powered by JetHome®