summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-10-19 09:25:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-27 15:38:50 +0300
commit7877e7a5a52e1c9716326b94dfe6c7e6cd7bce5a (patch)
treeb45e6c6b01c70a1e0a27ced2223b6116611f6823 /include
parent4b7617ae04de31fe96aae445a35395078b6eefd6 (diff)
downloadlinux-7877e7a5a52e1c9716326b94dfe6c7e6cd7bce5a.tar.xz
block: remove __sync_blockdev
[ Upstream commit 70164eb6ccb76ab679b016b4b60123bf4ec6c162 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-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 413c0148c0ce..6bbd393e6bcc 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1999,6 +1999,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)
{
@@ -2007,6 +2008,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);