Skip to content

Commit a6bb340

Browse files
Jens Axboegregkh
authored andcommitted
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>
1 parent 5bae7ac commit a6bb340

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎fs/debugfs/inode.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,6 @@ void debugfs_remove(struct dentry *dentry)
345345
switch (dentry->d_inode->i_mode & S_IFMT) {
346346
case S_IFDIR:
347347
ret = simple_rmdir(parent->d_inode, dentry);
348-
if (ret)
349-
printk(KERN_ERR
350-
"DebugFS rmdir on %s failed : "
351-
"directory not empty.\n",
352-
dentry->d_name.name);
353348
break;
354349
case S_IFLNK:
355350
kfree(dentry->d_inode->i_private);

0 commit comments

Comments
 (0)