Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1369867 > unrolled thread

[patch] ext4 crypto: fix some error handling

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-04-02 06:50 +0200
Last post2016-04-04 08:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [patch] ext4 crypto: fix some error handling Dan Carpenter <dan.carpenter@oracle.com> - 2016-04-02 06:50 +0200
    Re: [patch] ext4 crypto: fix some error handling Theodore Ts'o <tytso@mit.edu> - 2016-04-04 08:20 +0200

#1369867 — [patch] ext4 crypto: fix some error handling

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-04-02 06:50 +0200
Subject[patch] ext4 crypto: fix some error handling
Message-ID<rjlFw-6Uj-15@gated-at.bofh.it>
We should be testing for -ENOMEM but the minus sign is missing.

Fixes: c9af28fdd449 ('ext4 crypto: don't let data integrity writebacks fail with ENOMEM')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 51b3492..b39d9c7 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -477,7 +477,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
 		data_page = ext4_encrypt(inode, page, gfp_flags);
 		if (IS_ERR(data_page)) {
 			ret = PTR_ERR(data_page);
-			if (ret == ENOMEM && wbc->sync_mode == WB_SYNC_ALL) {
+			if (ret == -ENOMEM && wbc->sync_mode == WB_SYNC_ALL) {
 				if (io->io_bio) {
 					ext4_io_submit(io);
 					congestion_wait(BLK_RW_ASYNC, HZ/50);

[toc] | [next] | [standalone]


#1370379

FromTheodore Ts'o <tytso@mit.edu>
Date2016-04-04 08:20 +0200
Message-ID<rk61H-7nU-3@gated-at.bofh.it>
In reply to#1369867
On Sat, Apr 02, 2016 at 07:49:16AM +0300, Dan Carpenter wrote:
> We should be testing for -ENOMEM but the minus sign is missing.
> 
> Fixes: c9af28fdd449 ('ext4 crypto: don't let data integrity writebacks fail with ENOMEM')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks, applied.

					- Ted

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web