summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-04 21:58:25 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-04 21:58:25 +0000
commit7d379335f2b6a088aa51b44fc68f9e06db370321 (patch)
treeee5c499190bffce7f77f87225d2c5fdfd5a4a53d /libdiskfs
parentc5e1bff6f39f3bd3dc972f55da75ba294baef802 (diff)
Formerly io-write.c.~3~
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-write.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
index abec0cc8..4fc2e331 100644
--- a/libdiskfs/io-write.c
+++ b/libdiskfs/io-write.c
@@ -17,6 +17,7 @@
#include "priv.h"
#include "io_S.h"
+#include <fcntl.h>
/* Implement io_write as described in <hurd/io.defs>. */
error_t
@@ -52,7 +53,8 @@ diskfs_S_io_write(struct protid *cred,
off = cred->po->filepointer;
}
- while (off + datalen > np->i_allocsize)
+ err = 0;
+ while (off + datalen > np->allocsize)
{
err = diskfs_grow (np, off + datalen, cred);
if (err)
@@ -75,6 +77,6 @@ diskfs_S_io_write(struct protid *cred,
}
out:
- mutex_unlock (&np->i_toplock);
+ mutex_unlock (&np->lock);
return err;
}