summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-08-31 10:23:25 +1000
committerBen Hutchings <ben@decadent.org.uk>2017-11-26 13:50:29 +0000
commita09dbb488f1ee347771a971e9398d047d4f59344 (patch)
treeab789726a8a3b9b69edd4e1ba810dfa871851b18 /kernel
parent92baf719d42b4dc28a25081ef0819ffb47ff5bd7 (diff)
md/bitmap: disable bitmap_resize for file-backed bitmaps.
commit e8a27f836f165c26f867ece7f31eb5c811692319 upstream. bitmap_resize() does not work for file-backed bitmaps. The buffer_heads are allocated and initialized when the bitmap is read from the file, but resize doesn't read from the file, it loads from the internal bitmap. When it comes time to write the new bitmap, the bh is non-existent and we crash. The common case when growing an array involves making the array larger, and that normally means making the bitmap larger. Doing that inside the kernel is possible, but would need more code. It is probably easier to require people who use file-backed bitmaps to remove them and re-add after a reshape. So this patch disables the resizing of arrays which have file-backed bitmaps. This is better than crashing. Reported-by: Zhilong Liu <zlliu@suse.com> Fixes: d60b479d177a ("md/bitmap: add bitmap_resize function to allow bitmap resizing.") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions