diff options
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -437,13 +437,13 @@ writei(struct inode *ip, char *src, uint off, uint n) if(off > ip->size || off + n < off) return -1; if(off + n > MAXFILE*BSIZE) - n = MAXFILE*BSIZE - off; + return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ bp = bread(ip->dev, bmap(ip, off/BSIZE)); m = min(n - tot, BSIZE - off%BSIZE); memmove(bp->data + off%BSIZE, src, m); - bwrite(bp); + log_write(bp); brelse(bp); } |