Skip to content

Commit

Permalink
btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode
Browse files Browse the repository at this point in the history
The structure is internal so we should use struct btrfs_inode for that.

Reviewed-by: Boris Burkov <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Jul 11, 2024
1 parent 24e7459 commit c154a84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c154a84

Please sign in to comment.