Skip to content

Commit

Permalink
UBI: minor serialization fix
Browse files Browse the repository at this point in the history
The @vol->upd_marker should be protected by the @ubi->device_mutex,
otherwise 'paranoid_check_volume()' complains sometimes because
vol->upd_marker is 1 while vtbl_rec->upd_marker is 0.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 18, 2009
1 parent d38dce5 commit 95c9c1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/ubi/upd.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol)

mutex_lock(&ubi->device_mutex);
err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
mutex_unlock(&ubi->device_mutex);
vol->upd_marker = 1;
mutex_unlock(&ubi->device_mutex);
return err;
}

Expand Down Expand Up @@ -111,8 +111,8 @@ static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol,

mutex_lock(&ubi->device_mutex);
err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
mutex_unlock(&ubi->device_mutex);
vol->upd_marker = 0;
mutex_unlock(&ubi->device_mutex);
return err;
}

Expand Down

0 comments on commit 95c9c1d

Please sign in to comment.