summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/io-write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
index a78937ba..38cf768f 100644
--- a/libdiskfs/io-write.c
+++ b/libdiskfs/io-write.c
@@ -52,7 +52,7 @@ diskfs_S_io_write (struct protid *cred,
}
err = 0;
- while (off + datalen > np->allocsize)
+ while (off + (off_t) datalen > np->allocsize)
{
err = diskfs_grow (np, off + datalen, cred);
if (diskfs_synchronous)
@@ -61,7 +61,7 @@ diskfs_S_io_write (struct protid *cred,
goto out;
}
- if (off + datalen > np->dn_stat.st_size)
+ if (off + (off_t) datalen > np->dn_stat.st_size)
{
np->dn_stat.st_size = off + datalen;
np->dn_set_ctime = 1;