Revert "block: make function 'kill_bdev' static" with Kernel v5.15.
:This reverts commit
3373a3461aa15b7f9a871fa4cb2c9ef21ac20b47.
To free ramdisk memory, BLKFLSBUF support is required.
Change-Id: I55831bc50d8a7344a873172f2f7498d2a0e37786
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
}
/* 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;
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)
int sync_blockdev(struct block_device *bdev);
int sync_blockdev_nowait(struct block_device *bdev);
void sync_bdevs(bool wait);
+void kill_bdev(struct block_device *bdev);
#else
static inline void invalidate_bdev(struct block_device *bdev)
{
static inline void sync_bdevs(bool wait)
{
}
+static inline void kill_bdev(struct block_device *bdev)
+{
+}
#endif
int fsync_bdev(struct block_device *bdev);