linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chandan <chandan@linux.vnet.ibm.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz, chandra.seetharaman@us.ibm.com,
	alexander.karbstein@gmail.com
Subject: [PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
Date: Fri, 13 Sep 2013 19:34:10 +0530	[thread overview]
Message-ID: <3458610.yWSLv9Ftnr@localhost.localdomain> (raw)

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



             reply	other threads:[~2013-09-13 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 14:04 chandan [this message]
2013-09-13 14:29 ` [PATCH] Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0 David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3458610.yWSLv9Ftnr@localhost.localdomain \
    --to=chandan@linux.vnet.ibm.com \
    --cc=alexander.karbstein@gmail.com \
    --cc=chandra.seetharaman@us.ibm.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).