diff options
author | Yan Hong <clouds.yan@gmail.com> | 2013-04-30 15:26:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 17:04:00 -0700 |
commit | b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29 (patch) | |
tree | 6c068b2f78d8cabe735ae4be2a00a249f797492c /fs | |
parent | 04df32fa10ab9a6f0643db2949d42efc966bc844 (diff) | |
download | op-kernel-dev-b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29.zip op-kernel-dev-b4ea2eaa11fa2588c241a80d6d1e59f0f68f7b29.tar.gz |
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')
-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 aae187a..ce08de7 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) |