From: Derrick Brashear Date: Mon, 23 Apr 2001 08:19:14 +0000 (+0000) Subject: STABLE10-make-rmdir-on-linux-agree-with-linux-rmdir-implementation-errors-20010423 X-Git-Tag: openafs-stable-1_0_4~28 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0ed460d24bbac1f99889774841410751ec601b07;p=packages%2Fo%2Fopenafs.git 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 --- 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) {