mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
block: simplify the block device syncing code
Get rid of the indirections and just provide a sync_bdevs helper for the generic sync code. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211019062530.2174626-8-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
680e667bc2
commit
1e03a36bdf
4 changed files with 22 additions and 28 deletions
|
@ -1267,6 +1267,7 @@ int truncate_bdev_range(struct block_device *bdev, fmode_t mode, loff_t lstart,
|
|||
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);
|
||||
#else
|
||||
static inline void invalidate_bdev(struct block_device *bdev)
|
||||
{
|
||||
|
@ -1279,6 +1280,9 @@ static inline int sync_blockdev_nowait(struct block_device *bdev)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void sync_bdevs(bool wait)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
int fsync_bdev(struct block_device *bdev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue