On Thu, May 22, 2014 at 06:41:11PM +0800, Anand Jain wrote:
> @@ -385,7 +392,8 @@ static ssize_t btrfs_label_store(struct kobject *kobj,
> return PTR_ERR(trans);
>
> spin_lock(&root->fs_info->super_lock);
> - strcpy(fs_info->super_copy->label, buf);
> + strncpy(fs_info
From: Anand Jain
generally if you use
echo "test" > /sys/fs/btrfs//label
it would introduce return char at the end and it can not
be part of the label. The correct command is
echo -n "test" > /sys/fs/btrfs//label
This patch will check for this user error
Signed-off-by: Anand Jain
---
v3: