Commit 22823e95 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

ext4 crypto: fix some error handling

commit 4762cc3f upstream.

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

Fixes: c9af28fd ('ext4 crypto: don't let data integrity writebacks fail with ENOMEM')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a76f023
......@@ -492,7 +492,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment