From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754369AbbKLKm6 (ORCPT ); Thu, 12 Nov 2015 05:42:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37507 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbbKLKm5 convert rfc822-to-8bit (ORCPT ); Thu, 12 Nov 2015 05:42:57 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <1447282921-16352-1-git-send-email-geert@linux-m68k.org> <24593.1447323339@warthog.procyon.org.uk> To: Geert Uytterhoeven Cc: dhowells@redhat.com, Al Viro , linux-cachefs@redhat.com, "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20906.1447324973.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Thu, 12 Nov 2015 10:42:53 +0000 Message-ID: <20907.1447324973@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Geert Uytterhoeven wrote: > > This isn't quite the right solution. The uninitialised error path needs to > > set -ENOBUFS. > > That's what your commit 102f4d900c9c8f5e ("FS-Cache: Handle a write to the > page immediately beyond the EOF marker") does, and is also in its commit > description: > > Whilst we're at it, change the triggered assertion in CacheFiles to just > return -ENOBUFS instead. > > "ret" is used only to print the original error in a debug message. I'll adjust your patch to set the default value in ret to be -ENOBUFS instead of 0. > > Unfortunately, my compiler doesn't show a warning:-/ > > Need old gcc (4.1.2 ;-) Quite possibly - gcc-5.1 does seem to be a bit lacking in detection of such things. David