Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1148170ybi; Fri, 21 Jun 2019 15:00:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqw04qOopflNyQENEfGQdyHu1wg9rnjpHv9uRRdJSSM8uohl8ClXWjDMiwnlRWC5+8kGL9nb X-Received: by 2002:a63:151a:: with SMTP id v26mr20968651pgl.9.1561154440589; Fri, 21 Jun 2019 15:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561154440; cv=none; d=google.com; s=arc-20160816; b=DSt0Z6ern13CsJZHeUgFDZlaTFYQsUL1+zv0HObGeAQ2zzIgEHR1jhoZvvU6+mtmXn YczfkVIJq79CatEMVNMGBV041FpjkwuEoejuTbYXpIlMf+TvRcXTdMvlejAedl0fgK1p V/Z9xSNRSqxjx8eSBpS7MFkaiJDeNOXxoVPZidawYYxJR7MNRQDmvNIzIAJeeBm6lc3a f9UEjTRMVBRPtLWS30X049Ei4avENyl7BNr/DWYGKptSrHOsZIIgUFpYGs8zm4WVmxoq 5Td2LXFeS6gO8IHlRyrUbDXQcdQ0qTzZQMY8uHdzPIz9oqBuoIwLy8csw2h+mZWuaNhL yGdQ== 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=DAz33CmX+qeQfzoLlMnOdqzeWcDDa/RxJp8TPD4IV44=; b=WPzcVhQo48wttc+qlVw5E1/b+siVkKSiKe32tptZXsMuXN/gftdRRAM2azQTg8aGjp TRiupQFl3WTvBq61hlK0DZyL3QboCBMwpHlCRWZx07crmfRxMKoXsN6nZxCk8jmXJUl6 5OflYm23eBGKjm/67gxV4vM4rhTa02Sm3Haf8v0IjMnwIvJEL8pXb0AS14ix5IDwEwgw DKdGwhMgYfK5AkdL2+byFLE8eOUI22RzxSkkDBJG2DC/OxQispPXxUjTqSKIvtehiytF uh5KqkbCW0oip12uYn4KR628Jocq0U3PJAHsNCqZ6y0dk22Fxs7BK/W+h52ulK4K1lyU 4hhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tSfkN83s; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si1215697plb.258.2019.06.21.15.00.13; Fri, 21 Jun 2019 15:00:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tSfkN83s; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726244AbfFUWAL (ORCPT + 99 others); Fri, 21 Jun 2019 18:00:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:36280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfFUWAK (ORCPT ); Fri, 21 Jun 2019 18:00:10 -0400 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 05E6120679; Fri, 21 Jun 2019 22:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561154410; bh=hUnaoo5Fb3iD0gMCezjWig2sF2hiXRU9hbzHDO5W2lA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tSfkN83sBckuomdVEtOy4k3noQiM89Lmivj0BzVuvFLSEdTbiw7IaDsGirwrQerw/ MW4Dqx+UYmefgeEdCRAP32VCR2cAaFOlIb2y53zDI6KZ6fMGMqL3UjvZ0vDOk6EUWj 9gQs/C4xiuuXjWZ+2QiLjWqlFcg60PmwhQ8pcMYw= Date: Fri, 21 Jun 2019 15:00:08 -0700 From: Eric Biggers To: Chandan Rajendra Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, hch@infradead.org Subject: Re: [PATCH V3 3/7] fscrypt: remove struct fscrypt_ctx Message-ID: <20190621220007.GE167064@gmail.com> References: <20190616160813.24464-1-chandan@linux.ibm.com> <20190616160813.24464-4-chandan@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190616160813.24464-4-chandan@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Jun 16, 2019 at 09:38:09PM +0530, Chandan Rajendra wrote: > -/** > - * fscrypt_get_ctx() - Get a decryption context > - * @gfp_flags: The gfp flag for memory allocation > - * > - * Allocate and initialize a decryption context. > - * > - * Return: A new decryption context on success; an ERR_PTR() otherwise. > - */ > -struct fscrypt_ctx *fscrypt_get_ctx(gfp_t gfp_flags) > -{ > - struct fscrypt_ctx *ctx; > - unsigned long flags; > - > - /* > - * First try getting a ctx from the free list so that we don't have to > - * call into the slab allocator. > - */ > - spin_lock_irqsave(&fscrypt_ctx_lock, flags); > - ctx = list_first_entry_or_null(&fscrypt_free_ctxs, > - struct fscrypt_ctx, free_list); > - if (ctx) > - list_del(&ctx->free_list); > - spin_unlock_irqrestore(&fscrypt_ctx_lock, flags); > - if (!ctx) { > - ctx = kmem_cache_zalloc(fscrypt_ctx_cachep, gfp_flags); > - if (!ctx) > - return ERR_PTR(-ENOMEM); > - ctx->flags |= FS_CTX_REQUIRES_FREE_ENCRYPT_FL; > - } else { > - ctx->flags &= ~FS_CTX_REQUIRES_FREE_ENCRYPT_FL; > - } > - return ctx; > -} > -EXPORT_SYMBOL(fscrypt_get_ctx); FS_CTX_REQUIRES_FREE_ENCRYPT_FL is no longer used, so should be removed. - Eric