[PATCH] Fix for shmem_truncate_range() BUG_ON()
commitcb57fcaf9b8c1946aa1e436821a7a4901dc926d0
authorBadari Pulavarty <pbadari@us.ibm.com>
Fri, 22 Dec 2006 09:06:23 +0000 (22 01:06 -0800)
committerChris Wright <chrisw@sous-sol.org>
Wed, 10 Jan 2007 19:05:19 +0000 (10 11:05 -0800)
treeb3d350e5024ca025f6abecc55d8827536fe555eb
parent9ba9b18addcee8b7be8877727738f59a9fd37b29
[PATCH] Fix for shmem_truncate_range() BUG_ON()

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 <pbadari@us.ibm.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
mm/shmem.c