Skip to contentSkip to conversation

Remove unused variable in fixup_tree_root_location

PATCH New Balaji Rao 1 participant 1 message Jul 13, 2008 Btrfs file system

lore
Share & tools
lore

Balaji Rao

author
#0 lore raw

PATCH 1/1 Remove unused variable in fixup_tree_root_location

Remove a unused variable 'path' in fixup_tree_root_location.

inode.c +0 -5
diff -r 3f0eee804974 inode.c
@@ -1365,16 +1365,12 @@
 			     struct btrfs_root **sub_root,
 			     struct dentry *dentry)
 {
-	struct btrfs_path *path;
 	struct btrfs_root_item *ri;
 
 	if (btrfs_key_type(location) != BTRFS_ROOT_ITEM_KEY)
 		return 0;
 	if (location->objectid == BTRFS_ROOT_TREE_OBJECTID)
 		return 0;
-
-	path = btrfs_alloc_path();
-	BUG_ON(!path);
 
 	*sub_root = btrfs_read_fs_root(root->fs_info, location,
 					dentry->d_name.name,
@@ -1387,7 +1383,6 @@
 	btrfs_set_key_type(location, BTRFS_INODE_ITEM_KEY);
 	location->offset = 0;
 
-	btrfs_free_path(path);
 	return 0;
 }
 
Signature · 2 lines
Warm Regards,
Balaji Rao