[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6013.1493842277@warthog.procyon.org.uk>
Date: Wed, 03 May 2017 21:11:17 +0100
From: David Howells <dhowells@...hat.com>
To: Joe Perches <joe@...ches.com>
Cc: dhowells@...hat.com, Jeff Layton <jlayton@...chiereds.net>,
viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
mszeredi@...hat.com
Subject: Re: [PATCH 3/9] VFS: Introduce a mount context
Joe Perches <joe@...ches.com> wrote:
> > > krealloc would probably be more efficient and possible
> > > readable as likely there's already padding in the original
> > > allocation.
> >
> > The problem is if krealloc() fails: you've lost all those pointers to things
> > you then need to free.
>
> Huh? How could that happen?
>
> krealloc must always use a temporary.
> If krealloc returns NULL, the original allocation is kept.
Hmmm... Good point.
David
Powered by blists - more mailing lists