diff options
author | Yan Hong <clouds.yan@gmail.com> | 2013-05-01 02:26:47 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 04:04:00 +0400 |
commit | b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29 (patch) | |
tree | 6c068b2f78d8cabe735ae4be2a00a249f797492c /fs/block_dev.c | |
parent | 04df32fa10ab9a6f0643db2949d42efc966bc844 (diff) | |
download | linux-b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29.tar.xz |
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.c | 8 |
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) |