The patch titled
Fix for shmem_truncate_range() BUG_ON()
has been removed from the -mm tree. Its filename was
fix-for-shmem_truncate_range-bug_on.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: Fix for shmem_truncate_range() BUG_ON()
From: Badari Pulavarty <[EMAIL PROTECTED]>
Ran into BUG() while doing madvise(REMOVE) testing. If we are punching a
hole into shared memory segment using madvise(REMOVE) and the entire hole
is below the indirect blocks, we hit following assert.
BUG_ON(limit <= SHMEM_NR_DIRECT);
Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]>
Cc: Hugh Dickins <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
mm/shmem.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff -puN mm/shmem.c~fix-for-shmem_truncate_range-bug_on mm/shmem.c
--- a/mm/shmem.c~fix-for-shmem_truncate_range-bug_on
+++ a/mm/shmem.c
@@ -515,7 +515,12 @@ static void shmem_truncate_range(struct
size = SHMEM_NR_DIRECT;
nr_swaps_freed = shmem_free_swp(ptr+idx, ptr+size);
}
- if (!topdir)
+
+ /*
+ * If there are no indirect blocks or we are punching a hole
+ * below indirect blocks, nothing to be done.
+ */
+ if (!topdir || (punch_hole && (limit <= SHMEM_NR_DIRECT)))
goto done2;
BUG_ON(limit <= SHMEM_NR_DIRECT);
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html