From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF646C433E2 for ; Wed, 2 Sep 2020 10:49:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50F62206F0 for ; Wed, 2 Sep 2020 10:49:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="PNx9FMjY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50F62206F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AC7EA6B0002; Wed, 2 Sep 2020 06:49:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A780D6B0003; Wed, 2 Sep 2020 06:49:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9674E6B0037; Wed, 2 Sep 2020 06:49:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id 80DE46B0002 for ; Wed, 2 Sep 2020 06:49:03 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3C0F1181AEF10 for ; Wed, 2 Sep 2020 10:49:03 +0000 (UTC) X-FDA: 77217798966.08.week58_12018a8270a0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 11CE11819E769 for ; Wed, 2 Sep 2020 10:49:03 +0000 (UTC) X-HE-Tag: week58_12018a8270a0 X-Filterd-Recvd-Size: 3480 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Sep 2020 10:49:02 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id o21so4040265wmc.0 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=h+hXS8HCALVFMv5hMDalsjjhOOU3qOdiCvfEbi5MbA6Asta0PwN2soneRaeCgUV9Mp 9n83k9sFEg7y+EKEvgqaWOwm2DAVNk3fGH5TUjWLdgurxi1BNsgwy7Ie3RbYvwpMcVGO RV4j0F2+atO8hF272DqsbcCocJtOIu84+ZE5NX98qYTbDIdIhY82rJEuqL1bbA5wxAn8 vSgl/r7N5bPRRbVAq5WlWqWokJzsxrWT3wyY1Sq0GDVC5F7vRSP67W+EbSmE71CxvY7u f7yPJUgNDTP8h361RMMsWSauhVtETPX1/131iy7MwxmWbn7aA5KP/Hwf26WZwpyVJBTY EfFA== X-Gm-Message-State: AOAM533A8NgigkQOqSO15GxDInHKQTyjfri5a3yxCm7lDdTzSvc4fAQO uJqnETOIQmqc4DF0CzWs6gVvDA== X-Google-Smtp-Source: ABdhPJxkezEQ5EimdP4Yp+JtPtW0eRcJQ2iEIy0KpFqSwNAMzw6MmpDD6SCT6xU8qMChbK1udpZBEQ== 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) X-Rspamd-Queue-Id: 11CE11819E769 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.