]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode
authorDavid Sterba <dsterba@suse.com>
Mon, 31 Jan 2022 17:53:32 +0000 (18:53 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:28 +0000 (15:33 +0200)
The structure is internal so we should use struct btrfs_inode for that.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h

index d4f0445c4230ed7bf81fb5a436062f8ba9bcfe29..f30242066ed24d6901ab89c35694f37afc90b75c 100644 (file)
@@ -855,7 +855,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
        pending_snapshot->dentry = dentry;
        pending_snapshot->root = root;
        pending_snapshot->readonly = readonly;
-       pending_snapshot->dir = dir;
+       pending_snapshot->dir = BTRFS_I(dir);
        pending_snapshot->inherit = inherit;
 
        trans = btrfs_start_transaction(root, 0);
index 9590a1899b9d99139d79022a5fc8b98678d68f5d..cb5b5cac55e7d40f414257052ed4cc304090e52d 100644 (file)
@@ -1637,7 +1637,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        struct btrfs_root *root = pending->root;
        struct btrfs_root *parent_root;
        struct btrfs_block_rsv *rsv;
-       struct inode *parent_inode = pending->dir;
+       struct inode *parent_inode = &pending->dir->vfs_inode;
        struct btrfs_path *path;
        struct btrfs_dir_item *dir_item;
        struct extent_buffer *tmp;
index 81da655b5ee781f9d98f7997aa67b6d0729bff56..98c03ddc760b7530c43bb4e4a2b1c6c007628916 100644 (file)
@@ -172,7 +172,7 @@ struct btrfs_trans_handle {
 
 struct btrfs_pending_snapshot {
        struct dentry *dentry;
-       struct inode *dir;
+       struct btrfs_inode *dir;
        struct btrfs_root *root;
        struct btrfs_root_item *root_item;
        struct btrfs_root *snap;