[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <961aa3350812231437x4debaf9byf230a63582561010@mail.gmail.com>
Date: Wed, 24 Dec 2008 07:37:48 +0900
From: "Akinobu Mita" <akinobu.mita@...il.com>
To: "Josef Bacik" <jbacik@...hat.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
"Theodore Tso" <tytso@....edu>, adilger@....com,
linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: annotate unhandled kmem_cache_alloc() error
> BUG_ON is good for devel things, but for stable stuff it's better to let
> somebody know an error occured rather than panic'ing the box. The proper
> solution would be to do
>
> if (!new_entry)
> return -ENOMEM;
>
> or if there is some out: label set ret to -ENOMEM and goto out, whatever is
> appropriate in the context. Thanks,
I don't understand the code around here well.
But I think it is not that simple.
The "new_entry" is needed to free blocks. If it just returns error,
it leaks something.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists