From: Eric Biggers <ebiggers@kernel.org>
To: Chandan Rajendra <chandan@linux.ibm.com>
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
Date: Fri, 21 Jun 2019 15:00:08 -0700 [thread overview]
Message-ID: <20190621220007.GE167064@gmail.com> (raw)
In-Reply-To: <20190616160813.24464-4-chandan@linux.ibm.com>
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
next prev parent reply other threads:[~2019-06-21 22:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-16 16:08 [PATCH V3 0/7] Consolidate FS read I/O callbacks code Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 1/7] FS: Introduce read callbacks Chandan Rajendra
2019-06-21 20:03 ` Eric Biggers
2019-06-25 4:59 ` Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 2/7] Integrate read callbacks into Ext4 and F2FS Chandan Rajendra
2019-06-21 21:08 ` Eric Biggers
2019-06-25 6:05 ` Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 3/7] fscrypt: remove struct fscrypt_ctx Chandan Rajendra
2019-06-21 22:00 ` Eric Biggers [this message]
2019-06-16 16:08 ` [PATCH V3 4/7] fs/mpage.c: Integrate read callbacks Chandan Rajendra
2019-06-21 21:14 ` Eric Biggers
2019-06-25 6:21 ` Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 5/7] ext4: Wire up ext4_readpage[s] to use mpage_readpage[s] Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 6/7] Add decryption support for sub-pagesized blocks Chandan Rajendra
2019-06-21 21:29 ` Eric Biggers
2019-06-25 6:22 ` Chandan Rajendra
2019-06-16 16:08 ` [PATCH V3 7/7] ext4: Enable encryption for subpage-sized blocks Chandan Rajendra
2019-06-21 22:15 ` [PATCH V3 0/7] Consolidate FS read I/O callbacks code Eric Biggers
2019-06-25 6:24 ` Chandan Rajendra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190621220007.GE167064@gmail.com \
--to=ebiggers@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=chandan@linux.ibm.com \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).