From: Anand Jain Date: Tue, 20 May 2014 06:38:11 +0000 (+0800) Subject: btrfs: usage error should not be logged into system log X-Git-Tag: MMI-PSA29.97-13-9~11892^2~76 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=402a0f475938f26b0c7b3175c8163b91a12a8a9a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git btrfs: usage error should not be logged into system log I have an opinion that system logs /var/log/messages are valuable info to investigate the real system issues at the data center. People handling data center issues do spend a lot time and efforts analyzing messages files. Having usage error logged into /var/log/messages is something we should avoid. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index ba2a645dee07..c0dfda5644f2 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -374,11 +374,8 @@ static ssize_t btrfs_label_store(struct kobject *kobj, struct btrfs_root *root = fs_info->fs_root; int ret; - if (len >= BTRFS_LABEL_SIZE) { - pr_err("BTRFS: unable to set label with more than %d bytes\n", - BTRFS_LABEL_SIZE - 1); + if (len >= BTRFS_LABEL_SIZE) return -EINVAL; - } trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans))