diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2022-02-05 02:03:47 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2022-02-07 09:38:50 +0000 |
commit | 7a3e533acb99bd5cbe663654a0bb6a6ad0af7883 (patch) | |
tree | f9f1546bfd76c9e3a6c41ff383a384d8e09ab10f | |
parent | 83d203e3d7f4103526bb68d0b0b5d470ea31061b (diff) | |
download | src-7a3e533acb99bd5cbe663654a0bb6a6ad0af7883.tar.gz src-7a3e533acb99bd5cbe663654a0bb6a6ad0af7883.zip |
ffs_read(): lock buffers after snaplk with LK_NOWITNESS
(cherry picked from commit 0af463e6619cf9f7386129d427c244d3da30fa3a)
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index c2d6948dd140..1cfa6a91918f 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -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; |