diff mbox series

[01/17] btrfs: remove set/clear_pending_info helpers

Message ID 1925067c136aec3e1a01af78dbee66b6b0ebcc26.1663167823.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs: initial ctree.h cleanups, simple stuff | expand

Commit Message

Josef Bacik Sept. 14, 2022, 3:06 p.m. UTC
The last users of these helpers were removed in

5297199a8bca ("btrfs: remove inode number cache feature")

so delete these helpers.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/ctree.h | 24 ------------------------
 1 file changed, 24 deletions(-)

Comments

Qu Wenruo Sept. 15, 2022, 9:03 a.m. UTC | #1
On 2022/9/14 23:06, Josef Bacik wrote:
> The last users of these helpers were removed in
> 
> 5297199a8bca ("btrfs: remove inode number cache feature")
> 
> so delete these helpers.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   fs/btrfs/ctree.h | 24 ------------------------
>   1 file changed, 24 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 8b7b7a212da0..0003ba925d93 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -1644,30 +1644,6 @@ do {									\
>   #define btrfs_clear_pending(info, opt)	\
>   	clear_bit(BTRFS_PENDING_##opt, &(info)->pending_changes)
>   
> -/*
> - * Helpers for setting pending mount option changes.
> - *
> - * Expects corresponding macros
> - * BTRFS_PENDING_SET_ and CLEAR_ + short mount option name
> - */
> -#define btrfs_set_pending_and_info(info, opt, fmt, args...)            \
> -do {                                                                   \
> -       if (!btrfs_raw_test_opt((info)->mount_opt, opt)) {              \
> -               btrfs_info((info), fmt, ##args);                        \
> -               btrfs_set_pending((info), SET_##opt);                   \
> -               btrfs_clear_pending((info), CLEAR_##opt);               \
> -       }                                                               \
> -} while(0)
> -
> -#define btrfs_clear_pending_and_info(info, opt, fmt, args...)          \
> -do {                                                                   \
> -       if (btrfs_raw_test_opt((info)->mount_opt, opt)) {               \
> -               btrfs_info((info), fmt, ##args);                        \
> -               btrfs_set_pending((info), CLEAR_##opt);                 \
> -               btrfs_clear_pending((info), SET_##opt);                 \
> -       }                                                               \
> -} while(0)
> -
>   /*
>    * Inode flags
>    */
Johannes Thumshirn Sept. 15, 2022, 2:11 p.m. UTC | #2
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Oct. 7, 2022, 4:51 p.m. UTC | #3
On Wed, Sep 14, 2022 at 11:06:25AM -0400, Josef Bacik wrote:
> The last users of these helpers were removed in
> 
> 5297199a8bca ("btrfs: remove inode number cache feature")
> 
> so delete these helpers.

I've added a comment what was the purpose, basically for mount options
that must be applied during transaction commit, but we don't have any.
Patch can be reverted if needed.
diff mbox series

Patch

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8b7b7a212da0..0003ba925d93 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1644,30 +1644,6 @@  do {									\
 #define btrfs_clear_pending(info, opt)	\
 	clear_bit(BTRFS_PENDING_##opt, &(info)->pending_changes)
 
-/*
- * Helpers for setting pending mount option changes.
- *
- * Expects corresponding macros
- * BTRFS_PENDING_SET_ and CLEAR_ + short mount option name
- */
-#define btrfs_set_pending_and_info(info, opt, fmt, args...)            \
-do {                                                                   \
-       if (!btrfs_raw_test_opt((info)->mount_opt, opt)) {              \
-               btrfs_info((info), fmt, ##args);                        \
-               btrfs_set_pending((info), SET_##opt);                   \
-               btrfs_clear_pending((info), CLEAR_##opt);               \
-       }                                                               \
-} while(0)
-
-#define btrfs_clear_pending_and_info(info, opt, fmt, args...)          \
-do {                                                                   \
-       if (btrfs_raw_test_opt((info)->mount_opt, opt)) {               \
-               btrfs_info((info), fmt, ##args);                        \
-               btrfs_set_pending((info), CLEAR_##opt);                 \
-               btrfs_clear_pending((info), SET_##opt);                 \
-       }                                                               \
-} while(0)
-
 /*
  * Inode flags
  */