[PATCH] tmpfs: fix shmem_getpage_gfp VM_BUG_ON fix

From: Hugh Dickins
Date: Tue Nov 13 2012 - 20:36:29 EST


We're still hoping to hear back from Dave Jones: but either way,
please fold this patch into the earlier fix for 3.7 and -stable.

Remove its VM_BUG_ON: because either it's as I believe, a tautology
which cannot happen, and does not assert what I'd intended when I put
it in, and would even be wrong if it did (a non-NULL entry can validly
materialize there); or Dave actually hit it on his updated kernel,
in which case more research will be needed, but for upstream we
do not want a user to BUG there.

Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
---

mm/shmem.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- mmotm/mm/shmem.c 2012-11-09 09:43:46.908046342 -0800
+++ linux/mm/shmem.c 2012-11-13 17:16:38.532528959 -0800
@@ -1158,10 +1158,8 @@ repeat:
* Reset swap.val? No, leave it so "failed" goes back to
* "repeat": reading a hole and writing should succeed.
*/
- if (error) {
- VM_BUG_ON(error != -ENOENT);
+ if (error)
delete_from_swap_cache(page);
- }
}
if (error)
goto failed;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/