Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84295
b: refs/heads/master
c: 60c0315
h: refs/heads/master
i:
  84293: c2ba9aa
  84291: 04bea46
  84287: 755c68f
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jan 25, 2008
1 parent 38dc1f0 commit 980c885
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b68d0eea5daddc762c54bf02154f4ad607d9ce8
refs/heads/master: 60c031531a85b3580f66c2530f9b2802adcad4df
11 changes: 11 additions & 0 deletions trunk/drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,17 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
if (ubi->ro_mode)
return -EROFS;

if (len == 0) {
/*
* Special case when data length is zero. In this case the LEB
* has to be unmapped and mapped somewhere else.
*/
err = ubi_eba_unmap_leb(ubi, vol, lnum);
if (err)
return err;
return ubi_eba_write_leb(ubi, vol, lnum, NULL, 0, 0, dtype);
}

vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS);
if (!vid_hdr)
return -ENOMEM;
Expand Down

0 comments on commit 980c885

Please sign in to comment.