From 1dcd0195f5ca90c9017f1635204dfa6671efc73f Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 8 Jun 2015 11:57:57 -0400 Subject: [PATCH] add patch fix-ext4_get_crypto_ctx-in-ext4_decrypt_one --- fix-ext4_get_crypto_ctx-in-ext4_decrypt_one | 22 ++++++++++++++++++++++ series | 1 + timestamps | 9 +++++---- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 fix-ext4_get_crypto_ctx-in-ext4_decrypt_one diff --git a/fix-ext4_get_crypto_ctx-in-ext4_decrypt_one b/fix-ext4_get_crypto_ctx-in-ext4_decrypt_one new file mode 100644 index 00000000..3b8d6298 --- /dev/null +++ b/fix-ext4_get_crypto_ctx-in-ext4_decrypt_one @@ -0,0 +1,22 @@ +ext4 crypto: fix ext4_get_crypto_ctx()'s calling convention in ext4_decrypt_one + +Signed-off-by: Theodore Ts'o +--- + fs/ext4/crypto.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c +index f5c82e8..4573155 100644 +--- a/fs/ext4/crypto.c ++++ b/fs/ext4/crypto.c +@@ -396,8 +396,8 @@ int ext4_decrypt_one(struct inode *inode, struct page *page) + + struct ext4_crypto_ctx *ctx = ext4_get_crypto_ctx(inode); + +- if (!ctx) +- return -ENOMEM; ++ if (IS_ERR(ctx)) ++ return PTR_ERR(ctx); + ret = ext4_decrypt(ctx, page); + ext4_release_crypto_ctx(ctx); + return ret; diff --git a/series b/series index 4a4e5a10..7cb4c8b0 100644 --- a/series +++ b/series @@ -29,6 +29,7 @@ revert-must-not-fail-allocation-loops-back-to-GFP_NOFAIL verify-block-bitmap-even-after-fresh-initialization try-to-initialize-all-groups-we-can-in-case-of-failure-on-ppc64 return-error-code-from-ext4_mb_good_group +fix-ext4_get_crypto_ctx-in-ext4_decrypt_one ########################################## # unstable patches diff --git a/timestamps b/timestamps index eeb91021..4779176b 100755 --- a/timestamps +++ b/timestamps @@ -44,12 +44,13 @@ touch -d @1433093732 allocate-the-right-size-for-on-disk-symlink touch -d @1433093739 crypto-handle-unexpected-missing-keys touch -d @1433093855 release-crypto-resource-on-module-exit touch -d @1433338359 allocate-bounce-pages-using-gfp-nowait -touch -d @1433338419 stable-boundary touch -d @1433621980 only-call-ext4_truncate-when-size-le-isize touch -d @1433775190 revert-must-not-fail-allocation-loops-back-to-GFP_NOFAIL touch -d @1433776732 verify-block-bitmap-even-after-fresh-initialization touch -d @1433777917 try-to-initialize-all-groups-we-can-in-case-of-failure-on-ppc64 touch -d @1433778040 return-error-code-from-ext4_mb_good_group -touch -d @1433778056 series -touch -d @1433778061 status -touch -d @1433778063 timestamps +touch -d @1433778100 stable-boundary +touch -d @1433778831 series +touch -d @1433778896 fix-ext4_get_crypto_ctx-in-ext4_decrypt_one +touch -d @1433778896 status +touch -d @1433779069 timestamps -- 2.11.4.GIT