From 0ed460d24bbac1f99889774841410751ec601b07 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Mon, 23 Apr 2001 08:19:14 +0000 Subject: [PATCH] STABLE10-make-rmdir-on-linux-agree-with-linux-rmdir-implementation-errors-20010423 rmdir(2) claims ENOTDIR pathname, or a component used as a directory in pathname, is not, in fact, a directory. ENOTEMPTY pathname contains entries other than . and .. . meaning what we really want to return here is ENOTEMPTY --- src/afs/LINUX/osi_vnodeops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index ee36db530..6e5ecd7ad 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -982,12 +982,12 @@ int afs_linux_rmdir(struct inode *dip, struct dentry *dp) AFS_GLOCK(); code = afs_rmdir((struct vcache*)dip, name, credp); - /* Linux likes to see ENOTDIR returned from an rmdir() syscall + /* Linux likes to see ENOTEMPTY returned from an rmdir() syscall * that failed because a directory is not empty. So, we map - * EEXIST to ENOTDIR on linux. + * EEXIST to ENOTEMPTY on linux. */ if (code == EEXIST) { - code = ENOTDIR; + code = ENOTEMPTY; } if (!code) { -- 2.39.5