aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/dir-link.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-01-28 23:43:09 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-01-28 23:43:09 +0100
commite24381784b0a56896542d1a5828a77ad0e1c40ec (patch)
tree493e0d6ad811f563142c5de72a8b80bb5d142b93 /libdiskfs/dir-link.c
parent613f84a0fcd46f2143b046b57c6c6444eafa4d4d (diff)
parentb8c728ec51696c5d17ef09a00b3b193b70a487da (diff)
downloadhurd-e24381784b0a56896542d1a5828a77ad0e1c40ec.tar.gz
hurd-e24381784b0a56896542d1a5828a77ad0e1c40ec.tar.bz2
hurd-e24381784b0a56896542d1a5828a77ad0e1c40ec.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd
Diffstat (limited to 'libdiskfs/dir-link.c')
-rw-r--r--libdiskfs/dir-link.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libdiskfs/dir-link.c b/libdiskfs/dir-link.c
index 45d88948..ca5dd561 100644
--- a/libdiskfs/dir-link.c
+++ b/libdiskfs/dir-link.c
@@ -29,7 +29,7 @@ diskfs_S_dir_link (struct protid *dircred,
struct node *tnp; /* node being deleted implicitly */
struct node *dnp; /* directory of new entry */
struct dirstat *ds = alloca (diskfs_dirstat_size);
- error_t error;
+ error_t err;
if (!dircred)
return EOPNOTSUPP;
@@ -53,19 +53,19 @@ diskfs_S_dir_link (struct protid *dircred,
pthread_mutex_lock (&dnp->lock);
/* Lookup new location */
- error = diskfs_lookup (dnp, name, RENAME, &tnp, ds, dircred);
- if (!error && excl)
+ err = diskfs_lookup (dnp, name, RENAME, &tnp, ds, dircred);
+ if (!err && excl)
{
- error = EEXIST;
+ err = EEXIST;
diskfs_nput (tnp);
}
- if (error && error != ENOENT)
+ if (err && err != ENOENT)
{
- if (error == EAGAIN)
- error = EINVAL;
+ if (err == EAGAIN)
+ err = EINVAL;
diskfs_drop_dirstat (dnp, ds);
pthread_mutex_unlock (&dnp->lock);
- return error;
+ return err;
}
if (np == tnp)
@@ -107,8 +107,8 @@ diskfs_S_dir_link (struct protid *dircred,
if (tnp)
{
assert (!excl);
- error = diskfs_dirrewrite (dnp, tnp, np, name, ds);
- if (!error)
+ err = diskfs_dirrewrite (dnp, tnp, np, name, ds);
+ if (!err)
{
/* Deallocate link on TNP */
tnp->dn_stat.st_nlink--;
@@ -119,15 +119,15 @@ diskfs_S_dir_link (struct protid *dircred,
diskfs_nput (tnp);
}
else
- error = diskfs_direnter (dnp, name, np, ds, dircred);
+ err = diskfs_direnter (dnp, name, np, ds, dircred);
if (diskfs_synchronous)
diskfs_node_update (dnp, 1);
pthread_mutex_unlock (&dnp->lock);
pthread_mutex_unlock (&np->lock);
- if (!error)
+ if (!err)
/* MiG won't do this for us, which it ought to. */
mach_port_deallocate (mach_task_self (), filecred->pi.port_right);
- return error;
+ return err;
}