add patch fix-ocfs2-corrupt-when-updating-journal-superblock-fails
[ext4-patch-queue.git] / fix-ext4_get_crypto_ctx-in-ext4_decrypt_one
blob3b8d6298aa4ae03eaf1e38df1728385adf983f13
1 ext4 crypto: fix ext4_get_crypto_ctx()'s calling convention in ext4_decrypt_one
3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
4 ---
5  fs/ext4/crypto.c | 4 ++--
6  1 file changed, 2 insertions(+), 2 deletions(-)
8 diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
9 index f5c82e8..4573155 100644
10 --- a/fs/ext4/crypto.c
11 +++ b/fs/ext4/crypto.c
12 @@ -396,8 +396,8 @@ int ext4_decrypt_one(struct inode *inode, struct page *page)
14         struct ext4_crypto_ctx *ctx = ext4_get_crypto_ctx(inode);
16 -       if (!ctx)
17 -               return -ENOMEM;
18 +       if (IS_ERR(ctx))
19 +               return PTR_ERR(ctx);
20         ret = ext4_decrypt(ctx, page);
21         ext4_release_crypto_ctx(ctx);
22         return ret;