md: Don't let implementation detail of curr_resync leak out through sysfs.
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / md / bitmap.c
index 6cf587196b9983700f7a3d2f9e1d1732d5c385df..9a35320fb59f774b0e840d934bd2a16422e99f22 100644 (file)
@@ -1546,7 +1546,7 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector)
        wait_event(bitmap->mddev->recovery_wait,
                   atomic_read(&bitmap->mddev->recovery_active) == 0);
 
-       bitmap->mddev->curr_resync_completed = bitmap->mddev->curr_resync;
+       bitmap->mddev->curr_resync_completed = sector;
        set_bit(MD_CHANGE_CLEAN, &bitmap->mddev->flags);
        sector &= ~((1ULL << CHUNK_BLOCK_SHIFT(bitmap)) - 1);
        s = 0;