From: Yan Hong Date: Tue, 26 Mar 2013 23:24:14 +0000 (+1100) Subject: fs/block_dev.c: no need to check inode->i_bdev in bd_forget() X-Git-Tag: next-20130404~3^2~469 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dafa37925e0031e0d831ae268cb18dbc70c2524f;p=karo-tx-linux.git 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 Cc: Al Viro Signed-off-by: Andrew Morton --- 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)