Avoid to write garbage if uiomove fails.
This commit is contained in:
parent
5f346bab48
commit
4e45fd3449
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user