]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
btrfs: prevent to set invalid default subvolid
authorsatoru takeuchi <satoru.takeuchi@gmail.com>
Tue, 12 Sep 2017 13:42:52 +0000 (22:42 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:53 +0000 (16:20 -0500)
commit3edbbc4e5c32731f03e57472cfc2c12e0b664c8d
treee526a6f4fa1e3c9215e9afd08b0594594f7b6df5
parentc653d70bb474ee4ce3869b0f71178e15636bad91
btrfs: prevent to set invalid default subvolid

BugLink: http://bugs.launchpad.net/bugs/1721777
commit 6d6d282932d1a609e60dc4467677e0e863682f57 upstream.

`btrfs sub set-default` succeeds to set an ID which isn't corresponding to any
fs/file tree. If such the bad ID is set to a filesystem, we can't mount this
filesystem without specifying `subvol` or `subvolid` mount options.

Fixes: 6ef5ed0d386b ("Btrfs: add ioctl and incompat flag to set the default mount subvol")
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Reviewed-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/btrfs/ioctl.c