From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753227AbbKHFIP (ORCPT ); Sun, 8 Nov 2015 00:08:15 -0500 Received: from imap.thunk.org ([74.207.234.97]:48080 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbbKHFIJ (ORCPT ); Sun, 8 Nov 2015 00:08:09 -0500 Date: Sun, 8 Nov 2015 00:08:02 -0500 From: "Theodore Ts'o" To: Tetsuo Handa Cc: mhocko@kernel.org, linux-mm@kvack.org, Andrew Morton , LKML , Michal Hocko , john.johansen@canonical.com Subject: Re: [PATCH] jbd2: get rid of superfluous __GFP_REPEAT Message-ID: <20151108050802.GB3880@thunk.org> Mail-Followup-To: Theodore Ts'o , Tetsuo Handa , mhocko@kernel.org, linux-mm@kvack.org, Andrew Morton , LKML , Michal Hocko , john.johansen@canonical.com References: <1446740160-29094-4-git-send-email-mhocko@kernel.org> <1446826623-23959-1-git-send-email-mhocko@kernel.org> <563D526F.6030504@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <563D526F.6030504@I-love.SAKURA.ne.jp> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 07, 2015 at 10:22:55AM +0900, Tetsuo Handa wrote: > All jbd2_alloc() callers seem to pass GFP_NOFS. Therefore, use of > vmalloc() which implicitly passes GFP_KERNEL | __GFP_HIGHMEM can cause > deadlock, can't it? This vmalloc(size) call needs to be replaced with > __vmalloc(size, flags). jbd2_alloc is only passed in the bh->b_size, which can't be > PAGE_SIZE, so the code path that calls vmalloc() should never get called. When we conveted jbd2_alloc() to suppor sub-page size allocations in commit d2eecb039368, there was an assumption that it could be called with a size greater than PAGE_SIZE, but that's certaily not true today. - Ted