]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove incorrect assertion
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 24 Nov 2020 17:28:42 +0000 (09:28 -0800)
committerGitHub <noreply@github.com>
Tue, 24 Nov 2020 17:28:42 +0000 (09:28 -0800)
commit04a82e043d067181a8b352921ef6a3c3ac875b59
tree7b7bbdc0272ecbc05f13fdaa6946cfcf9b0a038d
parent6f5aac3ca057731d106b801bfdf060119571393c
Remove incorrect assertion

Commit 85703f6 added a new ASSERT to zfs_write() as part of the
cleanup which isn't correct in the case where multiple processes
are concurrently extending a file.  The `zp->z_size` is updated
atomically while holding a range lock on only a portion of the
file.  Therefore, it's possible for the file size to increase
after a same check is performed earlier in the loop causing this
ASSERT to fail.  The code itself handles this case correctly so
only the invalid ASSERT needs to be removed.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11235
module/zfs/zfs_vnops.c