HomeFreeBSD

Fix NULL pointer when O_SYNC read in snapshot

Description

Fix NULL pointer when O_SYNC read in snapshot

When doing read on a file open with O_SYNC, it will trigger zil_commit.
However for snapshot, there's no zil, so we shouldn't be doing that.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #6478
Closes #6494

Details

Provenance
Chunwei Chen <tuxoko@gmail.com>Authored on Aug 11 2017, 3:57 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 11 2017, 3:57 PM
Parents
rG761b8ec6bf98: Allow longer SPA names in stats
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG376994828fd3: Fix NULL pointer when O_SYNC read in snapshot (authored by Chunwei Chen <tuxoko@gmail.com>).Aug 11 2017, 3:57 PM