mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	fix locking issue in format and mount
This commit is contained in:
		
							
								
								
									
										8
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -4916,25 +4916,25 @@ cleanup: | ||||
|  | ||||
| int lfs_format_ts(lfs_t *lfs, const struct lfs_config *config) | ||||
| { | ||||
|     int err = config->lock(lfs->cfg); | ||||
|     int err = config->lock(config); | ||||
|     if(err) | ||||
|     { | ||||
|         return err; | ||||
|     } | ||||
|     err = lfs_format_raw(lfs, config); | ||||
|     config->unlock(lfs->cfg); | ||||
|     config->unlock(config); | ||||
|  | ||||
|     return err; | ||||
| } | ||||
| int lfs_mount_ts(lfs_t *lfs, const struct lfs_config *config) | ||||
| { | ||||
|     int err = config->lock(lfs->cfg); | ||||
|     int err = config->lock(config); | ||||
|     if(err) | ||||
|     { | ||||
|         return err; | ||||
|     } | ||||
|     err = lfs_mount_raw(lfs, config); | ||||
|     config->unlock(lfs->cfg); | ||||
|     config->unlock(config); | ||||
|  | ||||
|     return err; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user