mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	devtmpfs: Calling delete_path() only when necessary
The deleted variable is always 1 in current code. Initialize deleted variable to be 0, so delete_path() will be called only when necessary. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									ecfbf6fd9c
								
							
						
					
					
						commit
						fbde7c6119
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -299,7 +299,7 @@ static int handle_remove(const char *nodename, struct device *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct path parent;
 | 
						struct path parent;
 | 
				
			||||||
	struct dentry *dentry;
 | 
						struct dentry *dentry;
 | 
				
			||||||
	int deleted = 1;
 | 
						int deleted = 0;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dentry = kern_path_locked(nodename, &parent);
 | 
						dentry = kern_path_locked(nodename, &parent);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue