Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 05/11] btrfs: pass a btrfs_inode to btrfs_ioctl_send()
Date: Mon, 24 Jun 2024 18:23:12 +0200	[thread overview]
Message-ID: <384cbab78b400421de47ead8098333f859e720cd.1719246104.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1719246104.git.dsterba@suse.com>

Pass a struct btrfs_inode to btrfs_ioctl_send() and _btrfs_ioctl_send()
as it's an internal interface, allowing to remove some use of BTRFS_I.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/ioctl.c | 6 +++---
 fs/btrfs/send.c  | 4 ++--
 fs/btrfs/send.h  | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 1c31df88f19a..d4f0445c4230 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4473,7 +4473,7 @@ static int btrfs_ioctl_set_features(struct file *file, void __user *arg)
 	return ret;
 }
 
-static int _btrfs_ioctl_send(struct inode *inode, void __user *argp, bool compat)
+static int _btrfs_ioctl_send(struct btrfs_inode *inode, void __user *argp, bool compat)
 {
 	struct btrfs_ioctl_send_args *arg;
 	int ret;
@@ -4795,10 +4795,10 @@ long btrfs_ioctl(struct file *file, unsigned int
 		return btrfs_ioctl_set_received_subvol_32(file, argp);
 #endif
 	case BTRFS_IOC_SEND:
-		return _btrfs_ioctl_send(inode, argp, false);
+		return _btrfs_ioctl_send(BTRFS_I(inode), argp, false);
 #if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
 	case BTRFS_IOC_SEND_32:
-		return _btrfs_ioctl_send(inode, argp, true);
+		return _btrfs_ioctl_send(BTRFS_I(inode), argp, true);
 #endif
 	case BTRFS_IOC_GET_DEV_STATS:
 		return btrfs_ioctl_get_dev_stats(fs_info, argp);
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index bc2acda1d1bb..fb3675f5bf50 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -8065,10 +8065,10 @@ static void dedupe_in_progress_warn(const struct btrfs_root *root)
 		      btrfs_root_id(root), root->dedupe_in_progress);
 }
 
-long btrfs_ioctl_send(struct inode *inode, const struct btrfs_ioctl_send_args *arg)
+long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_args *arg)
 {
 	int ret = 0;
-	struct btrfs_root *send_root = BTRFS_I(inode)->root;
+	struct btrfs_root *send_root = inode->root;
 	struct btrfs_fs_info *fs_info = send_root->fs_info;
 	struct btrfs_root *clone_root;
 	struct send_ctx *sctx = NULL;
diff --git a/fs/btrfs/send.h b/fs/btrfs/send.h
index 8bd5aeafb6f5..b07f4aa66878 100644
--- a/fs/btrfs/send.h
+++ b/fs/btrfs/send.h
@@ -11,7 +11,7 @@
 #include <linux/sizes.h>
 #include <linux/align.h>
 
-struct inode;
+struct btrfs_inode;
 struct btrfs_ioctl_send_args;
 
 #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
@@ -182,6 +182,6 @@ enum {
 	__BTRFS_SEND_A_MAX		= 35,
 };
 
-long btrfs_ioctl_send(struct inode *inode, const struct btrfs_ioctl_send_args *arg);
+long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_args *arg);
 
 #endif
-- 
2.45.0


  parent reply	other threads:[~2024-06-24 16:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 16:22 [PATCH 00/11] Inode type conversion David Sterba
2024-06-24 16:23 ` [PATCH 01/11] btrfs: pass a btrfs_inode to btrfs_readdir_put_delayed_items() David Sterba
2024-06-24 16:23 ` [PATCH 02/11] btrfs: pass a btrfs_inode to btrfs_readdir_get_delayed_items() David Sterba
2024-06-24 16:23 ` [PATCH 03/11] btrfs: pass a btrfs_inode to is_data_inode() David Sterba
2024-06-24 16:23 ` [PATCH 04/11] btrfs: switch btrfs_block_group::inode to struct btrfs_inode David Sterba
2024-06-24 16:23 ` David Sterba [this message]
2024-06-24 16:23 ` [PATCH 06/11] btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode David Sterba
2024-06-24 16:23 ` [PATCH 07/11] btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode David Sterba
2024-06-24 16:23 ` [PATCH 08/11] btrfs: pass a btrfs_inode to btrfs_compress_heuristic() David Sterba
2024-06-24 16:23 ` [PATCH 09/11] btrfs: pass a btrfs_inode to btrfs_set_prop() David Sterba
2024-06-24 16:23 ` [PATCH 10/11] btrfs: pass a btrfs_inode to btrfs_load_inode_props() David Sterba
2024-06-24 16:23 ` [PATCH 11/11] btrfs: pass a btrfs_inode to btrfs_inode_inherit_props() David Sterba
2024-06-24 18:41 ` [PATCH 00/11] Inode type conversion Boris Burkov
2024-06-26 14:06 ` Filipe Manana
2024-06-26 14:39   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=384cbab78b400421de47ead8098333f859e720cd.1719246104.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox