diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-10-04 12:03:49 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-10-04 12:03:49 +0800 |
commit | a38b2dd146c0bba28633fe857f0c4626e0c691cc (patch) | |
tree | 2d81121c3690a36a3679bc78552067eee74c2c81 /drivers/md/bitmap.c | |
parent | 7ecc9777c5c76d7b31c376ffd4f59c4a85472a1b (diff) | |
parent | d59dabdc4cb380b79c965af28cd4ba001f04834b (diff) |
Merge tag 'v4.9.52' into linux-linaro-lsk-v4.9lsk-v4.9-17.09
This is the 4.9.52 stable release
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 2d826927a3bf..fb02c3979bf4 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1992,6 +1992,11 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks, long pages; struct bitmap_page *new_bp; + if (bitmap->storage.file && !init) { + pr_info("md: cannot resize file-based bitmap\n"); + return -EINVAL; + } + if (chunksize == 0) { /* If there is enough space, leave the chunk size unchanged, * else increase by factor of two until there is enough space. |