Skip to content

Commit

Permalink
ffs_read(): lock buffers after snaplk with LK_NOWITNESS
Browse files Browse the repository at this point in the history
(cherry picked from commit 0af463e)
  • Loading branch information
kostikbel committed Feb 7, 2022
1 parent 83d203e commit 7a3e533
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/ufs/ffs/ffs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,9 @@ ffs_read(ap)
return (EOVERFLOW);

bflag = GB_UNMAPPED | (uio->uio_segflg == UIO_NOCOPY ? 0 : GB_NOSPARSE);
#ifdef WITNESS
bflag |= IS_SNAPSHOT(ip) ? GB_NOWITNESS : 0;
#endif
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
break;
Expand Down

0 comments on commit 7a3e533

Please sign in to comment.