summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-10-19 08:25:25 +0200
committerJens Axboe <axboe@kernel.dk>2021-10-22 08:36:55 -0600
commit70164eb6ccb76ab679b016b4b60123bf4ec6c162 (patch)
tree940329ff4f1a63d41c97573a86620e428b5a2dfa /include/linux/blkdev.h
parent9a208ba5c9afa62c7b1e9c6f5e783066e84e2d3c (diff)
block: remove __sync_blockdev
Instead offer a new sync_blockdev_nowait helper for the !wait case. This new helper is exported as it will grow modular callers in a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211019062530.2174626-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f72ccb2829db..4b5a6bbdacd0 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1266,6 +1266,7 @@ int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
#ifdef CONFIG_BLOCK
void invalidate_bdev(struct block_device *bdev);
int sync_blockdev(struct block_device *bdev);
+int sync_blockdev_nowait(struct block_device *bdev);
#else
static inline void invalidate_bdev(struct block_device *bdev)
{
@@ -1274,6 +1275,10 @@ static inline int sync_blockdev(struct block_device *bdev)
{
return 0;
}
+static inline int sync_blockdev_nowait(struct block_device *bdev)
+{
+ return 0;
+}
#endif
int fsync_bdev(struct block_device *bdev);