Skip to contentSkip to conversation

Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0

PATCH In review chandan 2 participants 2 messages Sep 13, 2013 Btrfs file system

lore
Share & tools
lore

chandan

author
#0 lore raw

PATCH 1/1 Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0

This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default subvolume by passing a subvolume id of 0.

---
 fs/btrfs/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ioctl.c +1 -1
index 1a5b946..a059c3c 100644
@@ -3310,7 +3310,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
 	}
 
 	if (!objectid)
-		objectid = root->root_key.objectid;
+		objectid = BTRFS_FS_TREE_OBJECTID;
 
 	location.objectid = objectid;
 	location.type = BTRFS_ROOT_ITEM_KEY;
Signature · 1 line
1.8.3.1