lkml.org 
[lkml]   [2000]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [BUG] Inconsistent behaviour of rmdir


On Fri, 17 Nov 2000, Guest section DW wrote:

> I see that an entire discussion has taken place. Let me just remark this,
> quoting the Austin draft:
>
> If the path argument refers to a path whose final component is either
> dot or dot-dot, rmdir( ) shall fail.
>
> EINVAL The path argument contains a last component that is dot.
[snip]

> So, it seems that -EINVAL would be a better return value in case LAST_DOT.

No problems with that... Linus, could you apply the following (cut-and-paste
alert)?
--- fs/namei.c Fri Nov 17 18:43:20 2000
+++ fs/namei.c.new Fri Nov 17 18:48:00 2000
@@ -1381,8 +1381,11 @@
case LAST_DOTDOT:
error = -ENOTEMPTY;
goto exit1;
- case LAST_ROOT: case LAST_DOT:
+ case LAST_ROOT:
error = -EBUSY;
+ goto exit1;
+ case LAST_DOT:
+ error = -EINVAL;
goto exit1;
}
down(&nd.dentry->d_inode->i_sem);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.086 / U:5.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site