UBI: Fastmap: Calc fastmap size correctly
[sfrench/cifs-2.6.git] / drivers / mtd / ubi / cdev.c
index 7646220ca6e26dd4d687d6cca32de24d7d526977..59de69a24e406ca2c0fbc0fd34c2561e8696279c 100644 (file)
@@ -425,8 +425,10 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd,
                        break;
 
                err = ubi_start_update(ubi, vol, bytes);
-               if (bytes == 0)
+               if (bytes == 0) {
+                       ubi_volume_notify(ubi, vol, UBI_VOLUME_UPDATED);
                        revoke_exclusive(desc, UBI_READWRITE);
+               }
                break;
        }
 
@@ -699,7 +701,7 @@ static int rename_volumes(struct ubi_device *ubi,
                req->ents[i].name[req->ents[i].name_len] = '\0';
                n = strlen(req->ents[i].name);
                if (n != req->ents[i].name_len)
-                       err = -EINVAL;
+                       return -EINVAL;
        }
 
        /* Make sure volume IDs and names are unique */