From: David Howells <dhowells@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: dhowells@redhat.com, Al Viro <viro@zeniv.linux.org.uk>,
linux-cachefs@redhat.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()
Date: Thu, 12 Nov 2015 10:42:53 +0000 [thread overview]
Message-ID: <20907.1447324973@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAMuHMdVAreJEjXpcrfSOrFT2yS51jedj9NPACBq3e67qYjnGsQ@mail.gmail.com>
Geert Uytterhoeven <geert@linux-m68k.org> 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
next prev parent reply other threads:[~2015-11-12 10:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 23:02 [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page() Geert Uytterhoeven
2015-11-12 10:15 ` David Howells
2015-11-12 10:23 ` Geert Uytterhoeven
2015-11-12 10:42 ` David Howells [this message]
2015-11-12 10:43 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20907.1447324973@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-cachefs@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.