aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-11-04 13:08:16 -0400
committerJens Axboe <axboe@fb.com>2016-11-04 16:34:47 -0400
commitce98321bf7d274a470642ef99e1d82512673ce7c (patch)
treeb38ed4addc703bb68669c774275c4c4d4afa9be4 /fs/buffer.c
parente64855c6cfaa0a80c1b71c5f647cb792dc436668 (diff)
fs: Remove unmap_underlying_metadata
Nobody is using this function anymore. Remove it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 912d70169fca..1104ce8b4536 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1605,38 +1605,6 @@ void create_empty_buffers(struct page *page,
1605} 1605}
1606EXPORT_SYMBOL(create_empty_buffers); 1606EXPORT_SYMBOL(create_empty_buffers);
1607 1607
1608/*
1609 * We are taking a block for data and we don't want any output from any
1610 * buffer-cache aliases starting from return from that function and
1611 * until the moment when something will explicitly mark the buffer
1612 * dirty (hopefully that will not happen until we will free that block ;-)
1613 * We don't even need to mark it not-uptodate - nobody can expect
1614 * anything from a newly allocated buffer anyway. We used to used
1615 * unmap_buffer() for such invalidation, but that was wrong. We definitely
1616 * don't want to mark the alias unmapped, for example - it would confuse
1617 * anyone who might pick it with bread() afterwards...
1618 *
1619 * Also.. Note that bforget() doesn't lock the buffer. So there can
1620 * be writeout I/O going on against recently-freed buffers. We don't
1621 * wait on that I/O in bforget() - it's more efficient to wait on the I/O
1622 * only if we really need to. That happens here.
1623 */
1624void unmap_underlying_metadata(struct block_device *bdev, sector_t block)
1625{
1626 struct buffer_head *old_bh;
1627
1628 might_sleep();
1629
1630 old_bh = __find_get_block_slow(bdev, block);
1631 if (old_bh) {
1632 clear_buffer_dirty(old_bh);
1633 wait_on_buffer(old_bh);
1634 clear_buffer_req(old_bh);
1635 __brelse(old_bh);
1636 }
1637}
1638EXPORT_SYMBOL(unmap_underlying_metadata);
1639
1640/** 1608/**
1641 * clean_bdev_aliases: clean a range of buffers in block device 1609 * clean_bdev_aliases: clean a range of buffers in block device
1642 * @bdev: Block device to clean buffers in 1610 * @bdev: Block device to clean buffers in