summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-06 08:26:41 +0000
committerMiles Bader <miles@gnu.org>1997-02-06 08:26:41 +0000
commit5e8f24b2e5e167746d39759670701c51f4f434e7 (patch)
treed772d36e0108cb1c5993ac556a5572b2871354e1
parent833b51746fc0c60ee05569912b130aed9264264a (diff)
(diskfs_S_dir_link):
Supply DEPTH & NEW_DEPTH arguments to diskfs_lookup. Translate EAGAIN (meaning root's parent) to EINVAL.
-rw-r--r--libdiskfs/dir-link.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdiskfs/dir-link.c b/libdiskfs/dir-link.c
index 27928d05..e82e6fcf 100644
--- a/libdiskfs/dir-link.c
+++ b/libdiskfs/dir-link.c
@@ -1,5 +1,5 @@
/* libdiskfs implementation of fs.defs: dir_link
- Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -53,7 +53,8 @@ diskfs_S_dir_link (struct protid *dircred,
mutex_lock (&dnp->lock);
/* Lookup new location */
- error = diskfs_lookup (dnp, name, RENAME, &tnp, ds, dircred);
+ error = diskfs_lookup (dnp, name, RENAME, &tnp, ds, dircred,
+ dircred->po->depth, 0);
if (!error && excl)
{
error = EEXIST;
@@ -61,6 +62,8 @@ diskfs_S_dir_link (struct protid *dircred,
}
if (error && error != ENOENT)
{
+ if (error == EAGAIN)
+ error = EINVAL;
diskfs_drop_dirstat (dnp, ds);
mutex_unlock (&dnp->lock);
return error;