Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp369185pxk; Wed, 2 Sep 2020 03:50:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz557k1PFH4tWVZ68mFI/WPC3aEwKBU0fMPN2VMnvbt7PD6zkF8vC5ZlJs73HLDCPUPiqCA X-Received: by 2002:a17:906:c1c3:: with SMTP id bw3mr5968732ejb.8.1599043818112; Wed, 02 Sep 2020 03:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599043818; cv=none; d=google.com; s=arc-20160816; b=t1GrCxrEm4xG7h6o7EhsIYflrlrmiMk1q5oueEty55jq2KYCCGFGVXOuZv1kg2smSk 5lkhi4LC/g9r3aQT/aVd7E10N9Og20NVbhePcrN4t7rt7+eN06c+7OTYmMw4MB/RuF1u kjDZK9fMcFA/gXiHUDsQ2up2zKlBuczAcAa0vkTgLvqItb2qmjTKPs3RT9+7Umox0QDJ cnzHiyMsq16C6Rj7coF/vQb1fQTuOLI0CQFqpYul+pe0vSt1AkUpssCwyCL+GWhazNb3 yU9ZrQP225DXbVpI7g8vt33wt8/efM52rjrX4nAiFvMjHvF+Pcrnc6nogaJPLkPAeL1h yIOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wKy0FvZis71+4qxVI83Fx/5Pqd+StZsc7RYb47DfcTo=; b=cSVV7Kg58nfulxEHvwGGCDcWi5oGlp0APh57GDqJ9EnDgOsdnU9/ofd2aEHvpfq7vA Hi8a5+435mGDRRMyklY0/fwvTnnt+f8LF9mB1+h+NBfFQh2CFclvX4JvmZkz3g+h4+UG NCY0FtS9imYCRAsF7g6rtetLd2gweLvehav9noN+GTksR68ezf9HsDROBjfEMlpNuIC7 Sr31hRQCzhveeeBkTiogwGw7B7tPQGAcqxoEfItHj6gJ1HCCXHcRoPAXbi5LFcJWH45w ZQ8lsDqOv8SPT5+6+gXtmrgk8Fq2Os8jYwWVGpYJl8bqc32N6Cje1plBEu5P5q1I7Gfr SkHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=PNx9FMjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si2254879ejs.0.2020.09.02.03.49.55; Wed, 02 Sep 2020 03:50:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=PNx9FMjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbgIBKtF (ORCPT + 99 others); Wed, 2 Sep 2020 06:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbgIBKtD (ORCPT ); Wed, 2 Sep 2020 06:49:03 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA427C061244 for ; Wed, 2 Sep 2020 03:49:02 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id b79so4006976wmb.4 for ; Wed, 02 Sep 2020 03:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wKy0FvZis71+4qxVI83Fx/5Pqd+StZsc7RYb47DfcTo=; b=PNx9FMjYsdVOB/sxz0G794p4p4EA7KzmA0oiWvfG1w/fSMqOhV2y6pE59cAztBoMrU KT3KvIDP3s9Lrt7v0zTvO+T3rpb024sNuX2L+gauq55I5ZKdPV/Q2JF0Ou1qw48ghnpC 3guRKF1jNp7S/+wgHiYo+ggs98oIB/ShlniMw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wKy0FvZis71+4qxVI83Fx/5Pqd+StZsc7RYb47DfcTo=; b=lNkfx0BOhawIBm4QRcBNyKj5JMcmZeSbsC9Mh/wFkfm0S+BAeNk+r+dkkXFNkWC1DW lMsd3bGVs1cYOR2in7vJHlKCZ12TAW3veO8g7fGugwRUGSngvItpj3kBQA5JvIuh5LM4 V3xETrO7sq2Rz87pkSaBCYCA0fn8WCVG+QjU4Gu/eOWMA8B+7sdXV9FprWYmTpK/oYTa XPDzLedZkkAqTKlw8vfxBp/+p5hcdzaC2fBfv9ybg07LigGmtSHXKn+paz4YIRm81yXG zAjI5A2TAxu2a8uTekdR9jtgprPscq01P7ErjYXR+zWFZzrMwurmIxGNucBgxtHQb2oX X8yQ== X-Gm-Message-State: AOAM530Ye1yKW5a2XEaJqK96H8OceMDbxZU5aMJVF8f0vq6WXU3+MBC6 x5I9aRUguXLKN5JVIkQ94vOqgA== X-Received: by 2002:a7b:ce96:: with SMTP id q22mr50318wmj.132.1599043741171; Wed, 02 Sep 2020 03:49:01 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:63de:dd93:20be:f460]) by smtp.gmail.com with ESMTPSA id v12sm6680567wri.47.2020.09.02.03.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 03:48:59 -0700 (PDT) Date: Wed, 2 Sep 2020 11:48:59 +0100 From: Chris Down To: Byron Stanoszek Cc: Hugh Dickins , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tmpfs: Restore functionality of nr_inodes=0 Message-ID: <20200902104859.GA79629@chrisdown.name> References: <20200902035715.16414-1-gandalf@winds.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200902035715.16414-1-gandalf@winds.org> User-Agent: Mutt/1.14.6 (2020-07-11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Byron Stanoszek writes: >Commit e809d5f0b5c9 ("tmpfs: per-superblock i_ino support") made changes to >shmem_reserve_inode() in mm/shmem.c, however the original test for >(sbinfo->max_inodes) got dropped. This causes mounting tmpfs with option >nr_inodes=0 to fail: > > # mount -ttmpfs -onr_inodes=0 none /ext0 > mount: /ext0: mount(2) system call failed: Cannot allocate memory. > >This patch restores the nr_inodes=0 functionality. > >Fixes: e809d5f0b5c9 ("tmpfs: per-superblock i_ino support") >Cc: Chris Down >Signed-off-by: Byron Stanoszek Acked-by: Chris Down Thanks, good catch.