ext4: remove block_device_ejected
authorChristoph Hellwig <hch@lst.de>
Fri, 3 Apr 2015 03:56:32 +0000 (23:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 Apr 2015 03:56:32 +0000 (23:56 -0400)
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>
fs/ext4/super.c

index c681352f7c69b5af3b8be508364a036133b2a6ff..e47a552fea0573b8668dbc27e9df5da66b2247e4 100644 (file)
@@ -322,22 +322,6 @@ static void save_error_info(struct super_block *sb, const char *func,
        ext4_commit_super(sb, 1);
 }
 
-/*
- * The del_gendisk() function uninitializes the disk-specific data
- * structures, including the bdi structure, without telling anyone
- * else.  Once this happens, any attempt to call mark_buffer_dirty()
- * (for example, by ext4_commit_super), will cause a kernel OOPS.
- * This is a kludge to prevent these oops until we can put in a proper
- * hook in del_gendisk() to inform the VFS and file system layers.
- */
-static int block_device_ejected(struct super_block *sb)
-{
-       struct inode *bd_inode = sb->s_bdev->bd_inode;
-       struct backing_dev_info *bdi = inode_to_bdi(bd_inode);
-
-       return bdi->dev == NULL;
-}
-
 static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
 {
        struct super_block              *sb = journal->j_private;
@@ -4569,7 +4553,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
        struct buffer_head *sbh = EXT4_SB(sb)->s_sbh;
        int error = 0;
 
-       if (!sbh || block_device_ejected(sb))
+       if (!sbh)
                return error;
        if (buffer_write_io_error(sbh)) {
                /*