From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Jones Subject: Re: [PATCH] aio: clean up aio ring in the fail path Date: Wed, 4 Dec 2013 09:54:16 -0500 Message-ID: <20131204145416.GA22438@redhat.com> References: <529F019A.2040401@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Benjamin , linux-aio@kvack.org, fsdevel , linux-kernel , Al Viro , Kent , Kristian Nielsen To: Gu Zheng Return-path: Content-Disposition: inline In-Reply-To: <529F019A.2040401@cn.fujitsu.com> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Dec 04, 2013 at 06:19:06PM +0800, Gu Zheng wrote: > Clean up the aio ring file in the fail path of aio_setup_ring > and ioctx_alloc. And maybe it can fix the GPF issue reported by > Dave Jones: > https://lkml.org/lkml/2013/11/25/898 >=20 >=20 > Signed-off-by: Gu Zheng > --- > fs/aio.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/fs/aio.c b/fs/aio.c > index 08159ed..6efb7f6 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -367,8 +367,10 @@ static int aio_setup_ring(struct kioctx *ctx) > if (nr_pages > AIO_RING_PAGES) { > ctx->ring_pages =3D kcalloc(nr_pages, sizeof(struct page *), > GFP_KERNEL); > - if (!ctx->ring_pages) > + if (!ctx->ring_pages) { > + put_aio_ring_file(ctx); > return -ENOMEM; > + } > } > =20 CC fs/aio.o fs/aio.c: In function =E2=80=98aio_setup_ring=E2=80=99: fs/aio.c:363:4: error: implicit declaration of function =E2=80=98put_aio_= ring_file=E2=80=99 [-Werror=3Dimplicit-function-declaration] put_aio_ring_file(ctx); Is this dependant on another patch ? Dave -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org