diff options
| -rw-r--r-- | drivers/md/bitmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index de28c8095df8..4a05bacd6601 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
| @@ -1924,14 +1924,14 @@ int bitmap_copy_from_slot(struct mddev *mddev, int slot, | |||
| 1924 | 1924 | ||
| 1925 | if (clear_bits) { | 1925 | if (clear_bits) { |
| 1926 | bitmap_update_sb(bitmap); | 1926 | bitmap_update_sb(bitmap); |
| 1927 | /* Setting this for the ev_page should be enough. | 1927 | /* BITMAP_PAGE_PENDING is set, but bitmap_unplug needs |
| 1928 | * And we do not require both write_all and PAGE_DIRT either | 1928 | * BITMAP_PAGE_DIRTY or _NEEDWRITE to write ... */ |
| 1929 | */ | ||
| 1930 | for (i = 0; i < bitmap->storage.file_pages; i++) | 1929 | for (i = 0; i < bitmap->storage.file_pages; i++) |
| 1931 | set_page_attr(bitmap, i, BITMAP_PAGE_DIRTY); | 1930 | if (test_page_attr(bitmap, i, BITMAP_PAGE_PENDING)) |
| 1932 | bitmap_write_all(bitmap); | 1931 | set_page_attr(bitmap, i, BITMAP_PAGE_NEEDWRITE); |
| 1933 | bitmap_unplug(bitmap); | 1932 | bitmap_unplug(bitmap); |
| 1934 | } | 1933 | } |
| 1934 | bitmap_unplug(mddev->bitmap); | ||
| 1935 | *low = lo; | 1935 | *low = lo; |
| 1936 | *high = hi; | 1936 | *high = hi; |
| 1937 | err: | 1937 | err: |
