aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-05-13 10:05:11 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-05-18 05:28:26 -0400
commit95c9c1da79e59fd10ec5da3aeba22981383f7040 (patch)
treed21f37cac4371c07cfde2255656aa1a13a6241ec /drivers/mtd/ubi
parentd38dce5bfb400226bbffc81289c42a6271826a7e (diff)
UBI: minor serialization fix
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>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/upd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index dce1d92d8e9d..74fdc40c8627 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -70,8 +70,8 @@ static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol)
70 70
71 mutex_lock(&ubi->device_mutex); 71 mutex_lock(&ubi->device_mutex);
72 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); 72 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
73 mutex_unlock(&ubi->device_mutex);
74 vol->upd_marker = 1; 73 vol->upd_marker = 1;
74 mutex_unlock(&ubi->device_mutex);
75 return err; 75 return err;
76} 76}
77 77
@@ -111,8 +111,8 @@ static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol,
111 111
112 mutex_lock(&ubi->device_mutex); 112 mutex_lock(&ubi->device_mutex);
113 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); 113 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
114 mutex_unlock(&ubi->device_mutex);
115 vol->upd_marker = 0; 114 vol->upd_marker = 0;
115 mutex_unlock(&ubi->device_mutex);
116 return err; 116 return err;
117} 117}
118 118