]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
btrfs: Make btrfs_del_dir_entries_in_log take btrfs_inode
authorNikolay Borisov <n.borisov.lkml@gmail.com>
Tue, 17 Jan 2017 22:31:32 +0000 (00:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:54 +0000 (15:50 +0100)
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/tree-log.c
fs/btrfs/tree-log.h

index fe8da3974ff8e4a9d4cee98b162113faa042ba87..9a2b55eb6f732dc7eb836ae322ca052340a62a34 100644 (file)
@@ -4060,7 +4060,7 @@ skip_backref:
        }
 
        ret = btrfs_del_dir_entries_in_log(trans, root, name, name_len,
-                                          dir, index);
+                                          BTRFS_I(dir), index);
        if (ret == -ENOENT)
                ret = 0;
        else if (ret)
index df822908f2be23a3c201e007a82ef59a4e4e566b..caa8d886b4ae10a4169c68fd0a4d4301fb1778a5 100644 (file)
@@ -3084,7 +3084,7 @@ int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans,
 int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
                                 struct btrfs_root *root,
                                 const char *name, int name_len,
-                                struct inode *dir, u64 index)
+                                struct btrfs_inode *dir, u64 index)
 {
        struct btrfs_root *log;
        struct btrfs_dir_item *di;
@@ -3092,16 +3092,16 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
        int ret;
        int err = 0;
        int bytes_del = 0;
-       u64 dir_ino = btrfs_ino(BTRFS_I(dir));
+       u64 dir_ino = btrfs_ino(dir);
 
-       if (BTRFS_I(dir)->logged_trans < trans->transid)
+       if (dir->logged_trans < trans->transid)
                return 0;
 
        ret = join_running_log_trans(root);
        if (ret)
                return 0;
 
-       mutex_lock(&BTRFS_I(dir)->log_mutex);
+       mutex_lock(&dir->log_mutex);
 
        log = root->log_root;
        path = btrfs_alloc_path();
@@ -3176,7 +3176,7 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
 fail:
        btrfs_free_path(path);
 out_unlock:
-       mutex_unlock(&BTRFS_I(dir)->log_mutex);
+       mutex_unlock(&dir->log_mutex);
        if (ret == -ENOSPC) {
                btrfs_set_log_full_commit(root->fs_info, trans);
                ret = 0;
index 7f34d2d77865ef92b0ed45e0743d918c5287ee61..41679397ce6eaad16a6c931bd9d5845b9e08cb26 100644 (file)
@@ -72,7 +72,7 @@ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
 int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
                                 struct btrfs_root *root,
                                 const char *name, int name_len,
-                                struct inode *dir, u64 index);
+                                struct btrfs_inode *dir, u64 index);
 int btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,
                               struct btrfs_root *root,
                               const char *name, int name_len,