Revert "block: make function 'kill_bdev' static"
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Wed, 20 Jan 2021 04:52:50 +0000 (13:52 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 30 Mar 2021 01:44:59 +0000 (10:44 +0900)
This reverts commit 3373a3461aa15b7f9a871fa4cb2c9ef21ac20b47.

To free ramdisk memory, BLKFLSBUF support is required.

Change-Id: I921098c20cc6cad96d2c418a8bd525428e504c70
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
fs/block_dev.c
include/linux/fs.h

index fe201b7..315f12c 100644 (file)
@@ -75,7 +75,7 @@ static void bdev_write_inode(struct block_device *bdev)
 }
 
 /* Kill _all_ buffers and pagecache , dirty or not.. */
-static void kill_bdev(struct block_device *bdev)
+void kill_bdev(struct block_device *bdev)
 {
        struct address_space *mapping = bdev->bd_inode->i_mapping;
 
@@ -85,6 +85,7 @@ static void kill_bdev(struct block_device *bdev)
        invalidate_bh_lrus();
        truncate_inode_pages(mapping, 0);
 }
+EXPORT_SYMBOL(kill_bdev);
 
 /* Invalidate clean unused buffers and pagecache. */
 void invalidate_bdev(struct block_device *bdev)
index 8bde32c..5206047 100644 (file)
@@ -2987,6 +2987,7 @@ extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from);
 extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,
                        int datasync);
 extern void block_sync_page(struct page *page);
+extern void kill_bdev(struct block_device *);
 
 /* fs/splice.c */
 extern ssize_t generic_file_splice_read(struct file *, loff_t *,