1
0
Fork 0

ext4 crypto: fix some error handling

We should be testing for -ENOMEM but the minus sign is missing.

Fixes: c9af28fdd4 ('ext4 crypto: don't let data integrity writebacks fail with ENOMEM')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
hifive-unleashed-5.1
Dan Carpenter 2016-04-02 18:13:38 -04:00 committed by Theodore Ts'o
parent 8f0e8746b4
commit 4762cc3fbb
1 changed files with 1 additions and 1 deletions

View File

@ -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);