Skip to content

Commit 08439fe

Browse files
Christoph Hellwigtytso
Christoph Hellwig
authored andcommitted
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>
1 parent 5f80f62 commit 08439fe

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

fs/ext4/super.c

+1-17
Original file line numberDiff line numberDiff line change
@@ -322,22 +322,6 @@ static void save_error_info(struct super_block *sb, const char *func,
322322
ext4_commit_super(sb, 1);
323323
}
324324

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-
341325
static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
342326
{
343327
struct super_block *sb = journal->j_private;
@@ -4569,7 +4553,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
45694553
struct buffer_head *sbh = EXT4_SB(sb)->s_sbh;
45704554
int error = 0;
45714555

4572-
if (!sbh || block_device_ejected(sb))
4556+
if (!sbh)
45734557
return error;
45744558
if (buffer_write_io_error(sbh)) {
45754559
/*

0 commit comments

Comments
 (0)