From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755842AbbKYBNE (ORCPT ); Tue, 24 Nov 2015 20:13:04 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36464 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755613AbbKYBKq (ORCPT ); Tue, 24 Nov 2015 20:10:46 -0500 From: Jin Qian To: Greg Hackmann , Greg Kroah-Hartman , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Yu Ning , Dan Carpenter , Jason Hu , Joe Perches , Christoffer Dall , Peter Senna Tschudin , linux-kernel@vger.kernel.org Cc: Jin Qian Subject: [PATCH 5/8] platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN Date: Tue, 24 Nov 2015 17:10:09 -0800 Message-Id: <1448413812-24289-6-git-send-email-jinqian@android.com> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1448413812-24289-1-git-send-email-jinqian@android.com> References: <1448413812-24289-1-git-send-email-jinqian@android.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Hackmann On PIPE_ERROR_AGAIN, just stopping in the middle of a transfer and returning the number of bytes actually handled is the right behavior. Other errors should be returned on the next read() or write() call. Continue logging those until we confirm nothing actually relies on the existing (wrong) behavior of dropping errors on the floor. Signed-off-by: Greg Hackmann (cherry picked from commit 1bebc767c41766fc00787473e364db83d5fe6989) Signed-off-by: Jin Qian --- drivers/platform/goldfish/goldfish_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 86cc57f..afc6f8d 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -346,7 +346,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer, * cannot change it until we check if any user space * ABI relies on this behavior. */ - pr_info_ratelimited("android_pipe: backend returned error %d on %s\n", + if (status != PIPE_ERROR_AGAIN) + pr_info_ratelimited("goldfish_pipe: backend returned error %d on %s\n", status, is_write ? "write" : "read"); ret = 0; break; -- 2.6.0.rc2.230.g3dd15c0