Skip to content

Commit

Permalink
btrfs: Make btrfs_record_snapshot_destroy take btrfs_inode
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
Nikolay Borisov authored and kdave committed Feb 14, 2017
1 parent 4176bdb commit 4366355
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
trans->block_rsv = &block_rsv;
trans->bytes_reserved = block_rsv.size;

btrfs_record_snapshot_destroy(trans, dir);
btrfs_record_snapshot_destroy(trans, BTRFS_I(dir));

ret = btrfs_unlink_subvol(trans, root, dir,
dest->root_key.objectid,
Expand Down
8 changes: 4 additions & 4 deletions fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -5794,11 +5794,11 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
* parent root and tree of tree roots trees, etc) are done.
*/
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
struct inode *dir)
struct btrfs_inode *dir)
{
mutex_lock(&BTRFS_I(dir)->log_mutex);
BTRFS_I(dir)->last_unlink_trans = trans->transid;
mutex_unlock(&BTRFS_I(dir)->log_mutex);
mutex_lock(&dir->log_mutex);
dir->last_unlink_trans = trans->transid;
mutex_unlock(&dir->log_mutex);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/tree-log.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
struct btrfs_inode *dir, struct btrfs_inode *inode,
int for_rename);
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
struct inode *dir);
struct btrfs_inode *dir);
int btrfs_log_new_name(struct btrfs_trans_handle *trans,
struct inode *inode, struct inode *old_dir,
struct dentry *parent);
Expand Down

0 comments on commit 4366355

Please sign in to comment.