Skip to content

Commit c154a84

Browse files
committed
btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode
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]>
1 parent 24e7459 commit c154a84

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

fs/btrfs/ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
855855
pending_snapshot->dentry = dentry;
856856
pending_snapshot->root = root;
857857
pending_snapshot->readonly = readonly;
858-
pending_snapshot->dir = dir;
858+
pending_snapshot->dir = BTRFS_I(dir);
859859
pending_snapshot->inherit = inherit;
860860

861861
trans = btrfs_start_transaction(root, 0);

fs/btrfs/transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
16371637
struct btrfs_root *root = pending->root;
16381638
struct btrfs_root *parent_root;
16391639
struct btrfs_block_rsv *rsv;
1640-
struct inode *parent_inode = pending->dir;
1640+
struct inode *parent_inode = &pending->dir->vfs_inode;
16411641
struct btrfs_path *path;
16421642
struct btrfs_dir_item *dir_item;
16431643
struct extent_buffer *tmp;

fs/btrfs/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ struct btrfs_trans_handle {
172172

173173
struct btrfs_pending_snapshot {
174174
struct dentry *dentry;
175-
struct inode *dir;
175+
struct btrfs_inode *dir;
176176
struct btrfs_root *root;
177177
struct btrfs_root_item *root_item;
178178
struct btrfs_root *snap;

0 commit comments

Comments
 (0)