fs: simplify freeze_bdev/thaw_bdev

Store the frozen superblock in struct block_device to avoid the awkward
interface that can return a sb only used a cookie, an ERR_PTR or NULL.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Chao Yu <yuchao0@huawei.com>		[f2fs]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2020-11-24 11:54:06 +01:00 committed by Jens Axboe
parent 60b498852b
commit 040f04bd2e
9 changed files with 35 additions and 61 deletions

View file

@ -2020,7 +2020,7 @@ static inline int sync_blockdev(struct block_device *bdev)
#endif
int fsync_bdev(struct block_device *bdev);
struct super_block *freeze_bdev(struct block_device *bdev);
int thaw_bdev(struct block_device *bdev, struct super_block *sb);
int freeze_bdev(struct block_device *bdev);
int thaw_bdev(struct block_device *bdev);
#endif /* _LINUX_BLKDEV_H */