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


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to