mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	debugfs: remove rmdir() non-empty complaint
Hi, This patch kills the pointless debugfs rmdir() printk() when called on a non-empty directory. blktrace will sometimes have to call it a few times when forcefully ending a trace, which polutes the log with pointless warnings. Rationale: - It's more code to work-around this "problem" in the debugfs users, and you would have to add code to check for empty directories to do so (or assume that debugfs is using simple_ helpers, but that would be a layering violation). - Other rmdir() implementations don't complain about something this silly. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
		
							parent
							
								
									5bae7ac9fe
								
							
						
					
					
						commit
						a6bb340da3
					
				
					 1 changed files with 0 additions and 5 deletions
				
			
		| 
						 | 
					@ -345,11 +345,6 @@ void debugfs_remove(struct dentry *dentry)
 | 
				
			||||||
			switch (dentry->d_inode->i_mode & S_IFMT) {
 | 
								switch (dentry->d_inode->i_mode & S_IFMT) {
 | 
				
			||||||
			case S_IFDIR:
 | 
								case S_IFDIR:
 | 
				
			||||||
				ret = simple_rmdir(parent->d_inode, dentry);
 | 
									ret = simple_rmdir(parent->d_inode, dentry);
 | 
				
			||||||
				if (ret)
 | 
					 | 
				
			||||||
					printk(KERN_ERR
 | 
					 | 
				
			||||||
						"DebugFS rmdir on %s failed : "
 | 
					 | 
				
			||||||
						"directory not empty.\n",
 | 
					 | 
				
			||||||
						dentry->d_name.name);
 | 
					 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case S_IFLNK:
 | 
								case S_IFLNK:
 | 
				
			||||||
				kfree(dentry->d_inode->i_private);
 | 
									kfree(dentry->d_inode->i_private);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue