summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/upd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-17 09:48:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-17 09:48:30 -0700
commitb069e8ed4d5054b1fcd31a98bb2053bde645202f (patch)
tree69d6691c02220e8d1979683fd1b0dc2efbf4e5c5 /drivers/mtd/ubi/upd.c
parentb7c142dbf1e7422d0be7f7faa3f1163ad9da9788 (diff)
parentd9dd0887cc5c6df0dbbe5a307284610607eea7ab (diff)
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
* 'linux-next' of git://git.infradead.org/ubi-2.6: (21 commits) UBI: add reboot notifier UBI: handle more error codes UBI: fix multiple spelling typos UBI: fix kmem_cache_free on error patch UBI: print amount of reserved PEBs UBI: improve messages in the WL worker UBI: make gluebi a separate module UBI: remove built-in gluebi UBI: add notification API UBI: do not switch to R/O mode on read errors UBI: fix and clean-up error paths in WL worker UBI: introduce new constants UBI: fix race condition UBI: minor serialization fix UBI: do not panic if volume check fails UBI: add dump_stack in checking code UBI: fix races in I/O debugging checks UBI: small debugging code optimization UBI: improve debugging messages UBI: re-name volumes_mutex to device_mutex ...
Diffstat (limited to 'drivers/mtd/ubi/upd.c')
-rw-r--r--drivers/mtd/ubi/upd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index 6b4d1ae891a..74fdc40c862 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -68,10 +68,10 @@ static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol)
sizeof(struct ubi_vtbl_record));
vtbl_rec.upd_marker = 1;
- mutex_lock(&ubi->volumes_mutex);
+ mutex_lock(&ubi->device_mutex);
err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
- mutex_unlock(&ubi->volumes_mutex);
vol->upd_marker = 1;
+ mutex_unlock(&ubi->device_mutex);
return err;
}
@@ -109,10 +109,10 @@ static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol,
vol->last_eb_bytes = vol->usable_leb_size;
}
- mutex_lock(&ubi->volumes_mutex);
+ mutex_lock(&ubi->device_mutex);
err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
- mutex_unlock(&ubi->volumes_mutex);
vol->upd_marker = 0;
+ mutex_unlock(&ubi->device_mutex);
return err;
}