linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] fs/block_dev.c: need not to check inode->i_bdev in bd_forget()
@ 2012-09-26 11:38 Yan Hong
  2012-09-26 11:38 ` [PATCH 2/3] fs/debugsfs: get rid of unnecessary inode->i_private initialization Yan Hong
  2012-09-26 11:38 ` [PATCH 3/3] fs/fs-writeback.c: remove unneccesary parameter of __writeback_single_inode() Yan Hong
  0 siblings, 2 replies; 4+ messages in thread
From: Yan Hong @ 2012-09-26 11:38 UTC (permalink / raw)
  To: akpm; +Cc: linux-fsdevel, linux-kernel

Its only caller evict() has promised a non-NULL inode->i_bdev.

Signed-off-by: Yan Hong <clouds.yan@gmail.com>
---
 fs/block_dev.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 38e721b..9bdbd9b 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -669,11 +669,9 @@ void bd_forget(struct inode *inode)
 	struct block_device *bdev = NULL;
 
 	spin_lock(&bdev_lock);
-	if (inode->i_bdev) {
-		if (!sb_is_blkdev_sb(inode->i_sb))
-			bdev = inode->i_bdev;
-		__bd_forget(inode);
-	}
+	if (!sb_is_blkdev_sb(inode->i_sb))
+		bdev = inode->i_bdev;
+	__bd_forget(inode);
 	spin_unlock(&bdev_lock);
 
 	if (bdev)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-26 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26 11:38 [PATCH 1/3] fs/block_dev.c: need not to check inode->i_bdev in bd_forget() Yan Hong
2012-09-26 11:38 ` [PATCH 2/3] fs/debugsfs: get rid of unnecessary inode->i_private initialization Yan Hong
2012-09-26 11:38 ` [PATCH 3/3] fs/fs-writeback.c: remove unneccesary parameter of __writeback_single_inode() Yan Hong
2012-09-26 12:51   ` Fengguang Wu

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).