aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/ubi/cdev.c4
-rw-r--r--drivers/mtd/ubi/upd.c1
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index a7aa123afaf6..d9bd49421cce 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -368,6 +368,7 @@ static ssize_t vol_cdev_write(struct file *file, const char __user *buf,
368 */ 368 */
369 count = err; 369 count = err;
370 370
371 vol->updating = 0;
371 err = ubi_check_volume(ubi, vol->vol_id); 372 err = ubi_check_volume(ubi, vol->vol_id);
372 if (err < 0) 373 if (err < 0)
373 return err; 374 return err;
@@ -382,7 +383,6 @@ static ssize_t vol_cdev_write(struct file *file, const char __user *buf,
382 revoke_exclusive(desc, UBI_READWRITE); 383 revoke_exclusive(desc, UBI_READWRITE);
383 } 384 }
384 385
385 *offp += count;
386 return count; 386 return count;
387} 387}
388 388
@@ -430,8 +430,6 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
430 err = ubi_start_update(ubi, vol->vol_id, bytes); 430 err = ubi_start_update(ubi, vol->vol_id, bytes);
431 if (bytes == 0) 431 if (bytes == 0)
432 revoke_exclusive(desc, UBI_READWRITE); 432 revoke_exclusive(desc, UBI_READWRITE);
433
434 file->f_pos = 0;
435 break; 433 break;
436 } 434 }
437 435
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index e32b04d2e048..3defa579fab0 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -343,7 +343,6 @@ int ubi_more_update_data(struct ubi_device *ubi, int vol_id,
343 if (err == 0) { 343 if (err == 0) {
344 err = to_write; 344 err = to_write;
345 vfree(vol->upd_buf); 345 vfree(vol->upd_buf);
346 vol->updating = 0;
347 } 346 }
348 } 347 }
349 348