Skip to contentSkip to conversation

ext4 crypto: fix some error handling

PATCH Applied Dan Carpenter 2 participants 2 messages Apr 2, 2016 – Apr 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4 crypto: fix some error handling

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')
fs/ext4/page-io.c +1 -1
index 51b3492..b39d9c7 100644
@@ -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);
maintainer Applied
#1 lore raw
Quoted 4 lines · Dan Carpenter

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')

Thanks, applied.

- Ted