summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-04-02 18:13:38 -0400
committerTheodore Ts'o <tytso@mit.edu>2016-04-02 18:13:38 -0400
commit4762cc3fbbd89e5fd316d6e4d3244a8984444f8d (patch)
tree8ae24f431df3dd5ddf7d88c2b0e909dc7b1fa0f9
parent8f0e8746b4d57303d84f7b161a201e94fe22638f (diff)
downloadlwn-4762cc3fbbd89e5fd316d6e4d3244a8984444f8d.tar.gz
lwn-4762cc3fbbd89e5fd316d6e4d3244a8984444f8d.zip
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') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--fs/ext4/page-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 51b349211da7..b39d9c7e5952 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);