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>
Mon, 7 Feb 2022 08:01:41 +0000 (17:01 +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 29f020c..a8782ec 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 42d246a..68217bc 100644 (file)
@@ -2994,6 +2994,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 *,