]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs: Remove unmap_underlying_metadata
authorJan Kara <jack@suse.cz>
Fri, 4 Nov 2016 17:08:16 +0000 (18:08 +0100)
committerJens Axboe <axboe@fb.com>
Fri, 4 Nov 2016 20:34:47 +0000 (14:34 -0600)
Nobody is using this function anymore. Remove it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/buffer.c
include/linux/buffer_head.h

index 912d70169fca0f0b3621b055b5986e0b58fd682f..1104ce8b45369b9dbf43fb1d7fa9e46be9da50c6 100644 (file)
@@ -1605,38 +1605,6 @@ void create_empty_buffers(struct page *page,
 }
 EXPORT_SYMBOL(create_empty_buffers);
 
-/*
- * We are taking a block for data and we don't want any output from any
- * buffer-cache aliases starting from return from that function and
- * until the moment when something will explicitly mark the buffer
- * dirty (hopefully that will not happen until we will free that block ;-)
- * We don't even need to mark it not-uptodate - nobody can expect
- * anything from a newly allocated buffer anyway. We used to used
- * unmap_buffer() for such invalidation, but that was wrong. We definitely
- * don't want to mark the alias unmapped, for example - it would confuse
- * anyone who might pick it with bread() afterwards...
- *
- * Also..  Note that bforget() doesn't lock the buffer.  So there can
- * be writeout I/O going on against recently-freed buffers.  We don't
- * wait on that I/O in bforget() - it's more efficient to wait on the I/O
- * only if we really need to.  That happens here.
- */
-void unmap_underlying_metadata(struct block_device *bdev, sector_t block)
-{
-       struct buffer_head *old_bh;
-
-       might_sleep();
-
-       old_bh = __find_get_block_slow(bdev, block);
-       if (old_bh) {
-               clear_buffer_dirty(old_bh);
-               wait_on_buffer(old_bh);
-               clear_buffer_req(old_bh);
-               __brelse(old_bh);
-       }
-}
-EXPORT_SYMBOL(unmap_underlying_metadata);
-
 /**
  * clean_bdev_aliases: clean a range of buffers in block device
  * @bdev: Block device to clean buffers in
index d1ab91fc6d43e30ee26a6922ff285f3fc6f48235..d67ab83823adc81234b0380feca85877996817db 100644 (file)
@@ -168,7 +168,6 @@ int inode_has_buffers(struct inode *);
 void invalidate_inode_buffers(struct inode *);
 int remove_inode_buffers(struct inode *inode);
 int sync_mapping_buffers(struct address_space *mapping);
-void unmap_underlying_metadata(struct block_device *bdev, sector_t block);
 void clean_bdev_aliases(struct block_device *bdev, sector_t block,
                        sector_t len);
 static inline void clean_bdev_bh_alias(struct buffer_head *bh)