diff options
author | Christoph Hellwig <hch@lst.de> | 2015-04-02 23:56:32 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-04-02 23:56:32 -0400 |
commit | 08439fec266c3cc5702953b4f54bdf5649357de0 (patch) | |
tree | 3d73d9939e890d998d4287a4433ba4a74396afa5 /fs | |
parent | 5f80f62adae2a2920781a847805d34b36b323f7d (diff) |
ext4: remove block_device_ejected
bdi->dev now never goes away, so this function became useless.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/super.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c681352f7c69..e47a552fea05 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -322,22 +322,6 @@ static void save_error_info(struct super_block *sb, const char *func, | |||
322 | ext4_commit_super(sb, 1); | 322 | ext4_commit_super(sb, 1); |
323 | } | 323 | } |
324 | 324 | ||
325 | /* | ||
326 | * The del_gendisk() function uninitializes the disk-specific data | ||
327 | * structures, including the bdi structure, without telling anyone | ||
328 | * else. Once this happens, any attempt to call mark_buffer_dirty() | ||
329 | * (for example, by ext4_commit_super), will cause a kernel OOPS. | ||
330 | * This is a kludge to prevent these oops until we can put in a proper | ||
331 | * hook in del_gendisk() to inform the VFS and file system layers. | ||
332 | */ | ||
333 | static int block_device_ejected(struct super_block *sb) | ||
334 | { | ||
335 | struct inode *bd_inode = sb->s_bdev->bd_inode; | ||
336 | struct backing_dev_info *bdi = inode_to_bdi(bd_inode); | ||
337 | |||
338 | return bdi->dev == NULL; | ||
339 | } | ||
340 | |||
341 | static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) | 325 | static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) |
342 | { | 326 | { |
343 | struct super_block *sb = journal->j_private; | 327 | struct super_block *sb = journal->j_private; |
@@ -4569,7 +4553,7 @@ static int ext4_commit_super(struct super_block *sb, int sync) | |||
4569 | struct buffer_head *sbh = EXT4_SB(sb)->s_sbh; | 4553 | struct buffer_head *sbh = EXT4_SB(sb)->s_sbh; |
4570 | int error = 0; | 4554 | int error = 0; |
4571 | 4555 | ||
4572 | if (!sbh || block_device_ejected(sb)) | 4556 | if (!sbh) |
4573 | return error; | 4557 | return error; |
4574 | if (buffer_write_io_error(sbh)) { | 4558 | if (buffer_write_io_error(sbh)) { |
4575 | /* | 4559 | /* |