Avoid to write garbage if uiomove fails.

This commit is contained in:
Boris Popov 1999-12-28 16:14:54 +00:00
parent dc22f85f34
commit 687fce0361
2 changed files with 8 additions and 0 deletions

View File

@ -780,6 +780,10 @@ msdosfs_write(ap)
* Copy the data from user space into the buf header.
*/
error = uiomove(bp->b_data + croffset, n, uio);
if (error) {
brelse(bp);
break;
}
/*
* If they want this synchronous then write it and wait for

View File

@ -780,6 +780,10 @@ msdosfs_write(ap)
* Copy the data from user space into the buf header.
*/
error = uiomove(bp->b_data + croffset, n, uio);
if (error) {
brelse(bp);
break;
}
/*
* If they want this synchronous then write it and wait for