From 7f0add250f829248281e1745d92648f72192a8f4 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 26 Oct 2022 15:08:40 -0400 Subject: btrfs: move super_block specific helpers into super.h This will make syncing fs.h to user space a little easier if we can pull the super block specific helpers out of fs.h and put them in super.h. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/fs.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'fs/btrfs/fs.h') diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h index 7d0da8509567..c7f2a512fba2 100644 --- a/fs/btrfs/fs.h +++ b/fs/btrfs/fs.h @@ -801,11 +801,6 @@ static inline u64 btrfs_get_last_root_drop_gen(const struct btrfs_fs_info *fs_in return READ_ONCE(fs_info->last_root_drop_gen); } -static inline struct btrfs_fs_info *btrfs_sb(struct super_block *sb) -{ - return sb->s_fs_info; -} - /* * Take the number of bytes to be checksummed and figure out how many leaves * it would require to store the csums for that many bytes. @@ -947,18 +942,6 @@ static inline int btrfs_need_cleaner_sleep(struct btrfs_fs_info *fs_info) btrfs_fs_closing(fs_info); } -static inline void btrfs_set_sb_rdonly(struct super_block *sb) -{ - sb->s_flags |= SB_RDONLY; - set_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state); -} - -static inline void btrfs_clear_sb_rdonly(struct super_block *sb) -{ - sb->s_flags &= ~SB_RDONLY; - clear_bit(BTRFS_FS_STATE_RO, &btrfs_sb(sb)->fs_state); -} - static inline void btrfs_wake_unfinished_drop(struct btrfs_fs_info *fs_info) { clear_and_wake_up_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags); -- cgit v1.2.3-73-gaa49b