Commit dbf39ea4 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Make log_directory_changes take btrfs_inode

Signed-off-by: default avatarNikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 684a5773
...@@ -3450,7 +3450,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans, ...@@ -3450,7 +3450,7 @@ static noinline int log_dir_items(struct btrfs_trans_handle *trans,
* key logged by this transaction. * key logged by this transaction.
*/ */
static noinline int log_directory_changes(struct btrfs_trans_handle *trans, static noinline int log_directory_changes(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct inode *inode, struct btrfs_root *root, struct btrfs_inode *inode,
struct btrfs_path *path, struct btrfs_path *path,
struct btrfs_path *dst_path, struct btrfs_path *dst_path,
struct btrfs_log_ctx *ctx) struct btrfs_log_ctx *ctx)
...@@ -3464,9 +3464,8 @@ static noinline int log_directory_changes(struct btrfs_trans_handle *trans, ...@@ -3464,9 +3464,8 @@ static noinline int log_directory_changes(struct btrfs_trans_handle *trans,
min_key = 0; min_key = 0;
max_key = 0; max_key = 0;
while (1) { while (1) {
ret = log_dir_items(trans, root, BTRFS_I(inode), path, ret = log_dir_items(trans, root, inode, path, dst_path, key_type,
dst_path, key_type, ctx, min_key, ctx, min_key, &max_key);
&max_key);
if (ret) if (ret)
return ret; return ret;
if (max_key == (u64)-1) if (max_key == (u64)-1)
...@@ -4977,8 +4976,8 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, ...@@ -4977,8 +4976,8 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,
} }
if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) { if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
ret = log_directory_changes(trans, root, inode, path, dst_path, ret = log_directory_changes(trans, root, BTRFS_I(inode), path,
ctx); dst_path, ctx);
if (ret) { if (ret) {
err = ret; err = ret;
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment