[3.16.y-ckt stable] Patch "Btrfs: send, add missing check for dead clone root" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Jun 22 15:15:06 UTC 2015
This is a note to let you know that I have just added a patch titled
Btrfs: send, add missing check for dead clone root
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt14.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 9c41450b7389bd7df2a4901f5487a3cb342afe71 Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana at suse.com>
Date: Mon, 2 Mar 2015 20:53:52 +0000
Subject: Btrfs: send, add missing check for dead clone root
commit 5cc2b17e80cf5770f2e585c2d90fd8af1b901258 upstream.
After we locked the root's root item, a concurrent snapshot deletion
call might have set the dead flag on it. So check if the dead flag
is set and abort if it is, just like we do for the parent root.
Signed-off-by: Filipe Manana <fdmanana at suse.com>
Reviewed-by: David Sterba <dsterba at suse.cz>
Signed-off-by: Chris Mason <clm at fb.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/btrfs/send.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 6528aa662181..61205f6db114 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -5647,7 +5647,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
clone_sources_to_rollback = i + 1;
spin_lock(&clone_root->root_item_lock);
clone_root->send_in_progress++;
- if (!btrfs_root_readonly(clone_root)) {
+ if (!btrfs_root_readonly(clone_root) ||
+ btrfs_root_dead(clone_root)) {
spin_unlock(&clone_root->root_item_lock);
srcu_read_unlock(&fs_info->subvol_srcu, index);
ret = -EPERM;
More information about the kernel-team
mailing list