Re: [PATCH] tmpfs: fix uninitialized return value in shmem_link

From: Linus Torvalds
Date: Mon Feb 25 2019 - 14:54:17 EST


On Fri, Feb 22, 2019 at 10:35 PM Hugh Dickins <hughd@xxxxxxxxxx> wrote:
>
> When we made the shmem_reserve_inode call in shmem_link conditional, we
> forgot to update the declaration for ret so that it always has a known
> value. Dan Carpenter pointed out this deficiency in the original patch.

Applied.

Side note: how come gcc didn't warn about this? Yes, we disable that
warning for some cases because of lots of false positives, but I
thought the *default* setup still had it.

Is it just that the goto ends up confusing gcc enough that it never notices?

Linus