Page MenuHomeFreeBSD

D26620.id77782.diff
No OneTemporary

D26620.id77782.diff

Index: sys/kern/vfs_vnops.c
===================================================================
--- sys/kern/vfs_vnops.c
+++ sys/kern/vfs_vnops.c
@@ -3012,7 +3012,7 @@
struct uio io;
off_t startoff, endoff, xfer, xfer2;
u_long blksize;
- int error;
+ int error, interrupted;
bool cantseek, readzeros, eof, lastblock;
ssize_t aresid;
size_t copylen, len, rem, savlen;
@@ -3022,6 +3022,7 @@
holein = holeout = 0;
savlen = len = *lenp;
error = 0;
+ interrupted = 0;
dat = NULL;
error = vn_lock(invp, LK_SHARED);
@@ -3111,7 +3112,7 @@
* support holes on the server, but do not support FIOSEEKHOLE.
*/
eof = false;
- while (len > 0 && error == 0 && !eof) {
+ while (len > 0 && error == 0 && !eof && interrupted == 0) {
endoff = 0; /* To shut up compilers. */
cantseek = true;
startoff = *inoffp;
@@ -3172,6 +3173,8 @@
*inoffp += xfer;
*outoffp += xfer;
len -= xfer;
+ if (len < savlen)
+ interrupted = sig_intr();
}
}
copylen = MIN(len, endoff - startoff);
@@ -3193,7 +3196,7 @@
xfer -= (*inoffp % blksize);
}
/* Loop copying the data block. */
- while (copylen > 0 && error == 0 && !eof) {
+ while (copylen > 0 && error == 0 && !eof && interrupted == 0) {
if (copylen < xfer)
xfer = copylen;
error = vn_lock(invp, LK_SHARED);
@@ -3234,6 +3237,8 @@
*outoffp += xfer;
copylen -= xfer;
len -= xfer;
+ if (len < savlen)
+ interrupted = sig_intr();
}
}
xfer = blksize;

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 6:46 AM (17 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16080100
Default Alt Text
D26620.id77782.diff (1 KB)

Event Timeline