aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorYan Hong <clouds.yan@gmail.com>2013-04-30 18:26:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:00 -0400
commitb4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29 (patch)
tree6c068b2f78d8cabe735ae4be2a00a249f797492c /fs/block_dev.c
parent04df32fa10ab9a6f0643db2949d42efc966bc844 (diff)
fs/block_dev.c: no need to check inode->i_bdev in bd_forget()
Its only caller evict() has promised a non-NULL inode->i_bdev. Signed-off-by: Yan Hong <clouds.yan@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index aae187a7f94a..ce08de7467a3 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -617,11 +617,9 @@ void bd_forget(struct inode *inode)
617 struct block_device *bdev = NULL; 617 struct block_device *bdev = NULL;
618 618
619 spin_lock(&bdev_lock); 619 spin_lock(&bdev_lock);
620 if (inode->i_bdev) { 620 if (!sb_is_blkdev_sb(inode->i_sb))
621 if (!sb_is_blkdev_sb(inode->i_sb)) 621 bdev = inode->i_bdev;
622 bdev = inode->i_bdev; 622 __bd_forget(inode);
623 __bd_forget(inode);
624 }
625 spin_unlock(&bdev_lock); 623 spin_unlock(&bdev_lock);
626 624
627 if (bdev) 625 if (bdev)