btrfs: Make btrfs_record_snapshot_destroy take btrfs_inode
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
4176bdbf2d
commit
436635571b
@@ -2497,7 +2497,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
|||||||
trans->block_rsv = &block_rsv;
|
trans->block_rsv = &block_rsv;
|
||||||
trans->bytes_reserved = block_rsv.size;
|
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,
|
ret = btrfs_unlink_subvol(trans, root, dir,
|
||||||
dest->root_key.objectid,
|
dest->root_key.objectid,
|
||||||
|
|||||||
@@ -5794,11 +5794,11 @@ record:
|
|||||||
* parent root and tree of tree roots trees, etc) are done.
|
* parent root and tree of tree roots trees, etc) are done.
|
||||||
*/
|
*/
|
||||||
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
|
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
|
||||||
struct inode *dir)
|
struct btrfs_inode *dir)
|
||||||
{
|
{
|
||||||
mutex_lock(&BTRFS_I(dir)->log_mutex);
|
mutex_lock(&dir->log_mutex);
|
||||||
BTRFS_I(dir)->last_unlink_trans = trans->transid;
|
dir->last_unlink_trans = trans->transid;
|
||||||
mutex_unlock(&BTRFS_I(dir)->log_mutex);
|
mutex_unlock(&dir->log_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
|
|||||||
struct btrfs_inode *dir, struct btrfs_inode *inode,
|
struct btrfs_inode *dir, struct btrfs_inode *inode,
|
||||||
int for_rename);
|
int for_rename);
|
||||||
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
|
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,
|
int btrfs_log_new_name(struct btrfs_trans_handle *trans,
|
||||||
struct inode *inode, struct inode *old_dir,
|
struct inode *inode, struct inode *old_dir,
|
||||||
struct dentry *parent);
|
struct dentry *parent);
|
||||||
|
|||||||
Reference in New Issue
Block a user