[PATCH] Btrfs: remove unused code in __btrfs_unlink_inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It might get @leaf and @key in order to do some sanity checks on key's
fields, but since we don't check it any more, it's fine to remove the
code.

Signed-off-by: Liu Bo <bo.liu@xxxxxxxxxxxxxxxxx>
---
 fs/btrfs/inode.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d3febc3a6bc0..fd64d7ac76f9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3911,9 +3911,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
 	struct btrfs_fs_info *fs_info = root->fs_info;
 	struct btrfs_path *path;
 	int ret = 0;
-	struct extent_buffer *leaf;
 	struct btrfs_dir_item *di;
-	struct btrfs_key key;
 	u64 index;
 	u64 ino = btrfs_ino(inode);
 	u64 dir_ino = btrfs_ino(dir);
@@ -3935,8 +3933,6 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
 		ret = -ENOENT;
 		goto err;
 	}
-	leaf = path->nodes[0];
-	btrfs_dir_item_key_to_cpu(leaf, di, &key);
 	ret = btrfs_delete_one_dir_name(trans, root, path, di);
 	if (ret)
 		goto err;
-- 
1.8.3.1




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux