summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorYan Hong <clouds.yan@gmail.com>2013-04-30 15:26:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 17:04:00 -0700
commitb4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29 (patch)
tree6c068b2f78d8cabe735ae4be2a00a249f797492c /fs/block_dev.c
parent04df32fa10ab9a6f0643db2949d42efc966bc844 (diff)
downloadlinux-b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29.tar.bz2
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)
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)