From: Hoegeun Kwon Date: Wed, 20 Jan 2021 04:52:50 +0000 (+0900) Subject: Revert "block: make function 'kill_bdev' static" X-Git-Tag: submit/tizen/20220208.074352~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e16d4fd5bd75324d3a3516f300c468e46ce8ed23;p=platform%2Fkernel%2Flinux-rpi.git Revert "block: make function 'kill_bdev' static" This reverts commit 3373a3461aa15b7f9a871fa4cb2c9ef21ac20b47. To free ramdisk memory, BLKFLSBUF support is required. Change-Id: I921098c20cc6cad96d2c418a8bd525428e504c70 Signed-off-by: Hoegeun Kwon --- diff --git a/fs/block_dev.c b/fs/block_dev.c index 29f020c4b2d0..a8782ecfccbc 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -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) diff --git a/include/linux/fs.h b/include/linux/fs.h index 42d246a94228..68217bc7c2cf 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -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 *,