diff options
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 4 |
1 files changed, 1 insertions, 3 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 | ||