From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:41885 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753405AbdJCM0B (ORCPT ); Tue, 3 Oct 2017 08:26:01 -0400 Date: Tue, 3 Oct 2017 14:25:59 +0200 From: Jan Kara To: Jens Axboe Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hannes@cmpxchg.org, jack@suse.cz, torvalds@linux-foundation.org Subject: Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases Message-ID: <20171003122559.GL11879@quack2.suse.cz> References: <1506543239-31470-1-git-send-email-axboe@kernel.dk> <1506543239-31470-3-git-send-email-axboe@kernel.dk> <20171003121049.GJ11879@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171003121049.GJ11879@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 03-10-17 14:10:49, Jan Kara wrote: > On Wed 27-09-17 14:13:49, Jens Axboe wrote: > > We currently it it for find_or_create_page(), which means that it > > cannot fail. Ensure we also pass in 'retry == true' to > > alloc_page_buffers(), which also ensure that it cannot fail. > > > > After this, there are no failure cases in grow_dev_page() that > > occur because of a failed memory allocation. > > > > Signed-off-by: Jens Axboe > > Makes sense. You can add: > > Reviewed-by: Jan Kara I forgot one question though: > > page = find_or_create_page(inode->i_mapping, index, gfp_mask); > > - if (!page) > > - return ret; Are we sure find_or_create_page() cannot fail for other reasons than ENOMEM? Currently it seems to be the case AFAICT but it isn't obvious to me that is guaranteed in future as well... Honza -- Jan Kara SUSE Labs, CR