mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block: use I_BDEV to get _bdev_ from _inode_
@ 2012-05-15  1:14 Yuanhan Liu
  0 siblings, 0 replies; only message in thread
From: Yuanhan Liu @ 2012-05-15  1:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Yuanhan Liu

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-15  1:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15  1:14 [PATCH] block: use I_BDEV to get _bdev_ from _inode_ Yuanhan Liu

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®