diff options
| author | John Dyson <dyson@FreeBSD.org> | 1995-11-19 20:24:15 +0000 |
|---|---|---|
| committer | John Dyson <dyson@FreeBSD.org> | 1995-11-19 20:24:15 +0000 |
| commit | b0a50fff55d519c944d1eea40b3679cd08730b6d (patch) | |
| tree | 4ce311f4ff957118a9c6238aeec96997da4f3907 /sys/gnu/ext2fs/ext2_readwrite.c | |
| parent | aa3960192e674e3b6e08095fe347daea0b9cc38d (diff) | |
Notes
Diffstat (limited to 'sys/gnu/ext2fs/ext2_readwrite.c')
| -rw-r--r-- | sys/gnu/ext2fs/ext2_readwrite.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c index be018317378f..8deb0b1a1079 100644 --- a/sys/gnu/ext2fs/ext2_readwrite.c +++ b/sys/gnu/ext2fs/ext2_readwrite.c @@ -137,10 +137,12 @@ READ(ap) break; xfersize = size; } - if (error = - uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio)) - break; - + if (uio->uio_segflg != UIO_NOCOPY) + ip->i_flag |= IN_RECURSE; + error = + uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); + if (uio->uio_segflg != UIO_NOCOPY) + ip->i_flag &= ~IN_RECURSE; #if !defined(__FreeBSD__) if (S_ISREG(mode) && (xfersize + blkoffset == fs->s_frag_size || uio->uio_offset == ip->i_size)) @@ -261,8 +263,12 @@ WRITE(ap) if (size < xfersize) xfersize = size; + if (uio->uio_segflg != UIO_NOCOPY) + ip->i_flag |= IN_RECURSE; error = uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); + if (uio->uio_segflg != UIO_NOCOPY) + ip->i_flag &= ~IN_RECURSE; if (ioflag & IO_SYNC) (void)bwrite(bp); @@ -280,7 +286,8 @@ WRITE(ap) } } else { #if defined(__FreeBSD__) - bp->b_flags |= B_CLUSTEROK; + if (doclusterwrite) + bp->b_flags |= B_CLUSTEROK; #endif bdwrite(bp); } |
