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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55190
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