* [PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
@ 2013-09-13 14:04 chandan
2013-09-13 14:29 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: chandan @ 2013-09-13 14:04 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba, chandra.seetharaman, alexander.karbstein
This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default
subvolume by passing a subvolume id of 0.
Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
---
fs/btrfs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 1a5b946..a059c3c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-13 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 14:04 [PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0 chandan
2013-09-13 14:29 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).