22 lines
709 B
Diff
22 lines
709 B
Diff
From: Theodore Ts'o <tytso@mit.edu>
|
|
Date: Mon, 29 Jul 2013 16:12:56 +0000
|
|
Subject: ext4: fix retry handling in ext4_ext_truncate()
|
|
Origin: https://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git/commit/?id=94eec0fc3520c759831763d866421b4d60b599b4
|
|
|
|
We tested for ENOMEM instead of -ENOMEM. Oops.
|
|
|
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Cc: stable@vger.kernel.org
|
|
---
|
|
--- a/fs/ext4/extents.c
|
|
+++ b/fs/ext4/extents.c
|
|
@@ -4389,7 +4389,7 @@ void ext4_ext_truncate(handle_t *handle,
|
|
retry:
|
|
err = ext4_es_remove_extent(inode, last_block,
|
|
EXT_MAX_BLOCKS - last_block);
|
|
- if (err == ENOMEM) {
|
|
+ if (err == -ENOMEM) {
|
|
cond_resched();
|
|
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
|
goto retry;
|