From: akpm@linux-foundation.org Subject: [patch 17/21] seq_file: return a negative error code when seq_path_root() fails. Date: Fri, 18 Sep 2009 13:05:59 -0700 Message-ID: <200909182005.n8IK5xsJ019696@imap1.linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Cc: linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, penguin-kernel@i-love.sakura.ne.jp, penguin-kernel@i-love.sakura.ne.jp To: viro@zeniv.linux.org.uk Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:57484 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758480AbZIRUGT (ORCPT ); Fri, 18 Sep 2009 16:06:19 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Tetsuo Handa seq_path_root() is returning a return value of successful __d_path() instead of returning a negative value when mangle_path() failed. This is not a bug so far because nobody is using return value of seq_path_root(). Signed-off-by: Tetsuo Handa Cc: Al Viro Signed-off-by: Andrew Morton --- fs/seq_file.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/seq_file.c~seq_file-return-a-negative-error-code-when-seq_path_root-fails fs/seq_file.c --- a/fs/seq_file.c~seq_file-return-a-negative-error-code-when-seq_path_root-fails +++ a/fs/seq_file.c @@ -470,6 +470,7 @@ int seq_path_root(struct seq_file *m, st m->count = s - m->buf; return 0; } + err = -ENAMETOOLONG; } } m->count = m->size; _