GFS2: Get a block reservation before resizing a file
authorBob Peterson <rpeterso@redhat.com>
Fri, 1 Feb 2013 17:03:02 +0000 (12:03 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2013 17:21:11 +0000 (09:21 -0800)
commit496064cd2a5ec740671a522e5fa154ce91dfb012
tree3fb128c55a447c322e0f8a7596b0de5a6c009987
parenta56de15779ba561c66c9fa04e6339f9a044b2001
GFS2: Get a block reservation before resizing a file

commit d2b47cfb26fe06002b8011707baac71a9ae8166f upstream.

This patch allocates a block reservation structure before growing
or shrinking a file. Without this structure, the grow or shink code
can reference the bad pointer.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/bmap.c