Re: [PATCH] FS-Cache: Add missing initialization of ret in cachefiles_write_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> 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

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cachefs



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux