summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-24 11:54:06 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-01 14:53:38 -0700
commit040f04bd2e825f1d80b14a0e0ac3d830339eb779 (patch)
tree344a715d906949d20f1131c6f169b26fdb8e6eea /include/linux
parent60b498852bf219c0bf2b0864c69972840978ca43 (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk_types.h1
-rw-r--r--include/linux/blkdev.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index d9b69bbde5cc..ebfb4e7c1fd1 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -46,6 +46,7 @@ struct block_device {
int bd_fsfreeze_count;
/* Mutex for freeze */
struct mutex bd_fsfreeze_mutex;
+ struct super_block *bd_fsfreeze_sb;
} __randomize_layout;
/*
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 05b346a68c2e..12810a19edeb 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -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 */