[PATCH 1/4] Btrfs: fix wrong send_in_progress accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steps to reproduce:

 # mkfs.btrfs -f /dev/sda8
 # mount /dev/sda8 /mnt
 # btrfs sub snapshot -r /mnt /mnt/snap1
 # btrfs sub snapshot -r /mnt /mnt/snap2
 # btrfs send /mnt/snap2 -p /mnt/snap1

As @send_root will also add into clone_sources, and we should
take care not to decrease its count twice.

Signed-off-by: Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>
---
Hi david, i am ok to fold this patch into your previous patch
or as a seperated patch.
---
 fs/btrfs/send.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index bff0b1a..076b066 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4908,6 +4908,7 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
 			spin_unlock(&clone_root->root_item_lock);
 			sctx->clone_roots[i].root = clone_root;
 		}
+		clone_sources_to_rollback--;
 		vfree(clone_sources_tmp);
 		clone_sources_tmp = NULL;
 	}
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux