HomeFreeBSD

Fix zfs_putpage() lock inversion (again)

Description

Fix zfs_putpage() lock inversion (again)

This is a follow up commit to 74328ee which correctly resolved a lock
inversion between zfs_putpage() and zfs_free_range(). Unfortunately,
in the process it accidentally introduced another inversion between
zfs_putpage() and zfs_read(). The page must be unlocked before taking
the range lock. This patch corrects that issue.

In addition, because the locking rules here are subtle a block comment
has been added clearly explaining why the ordering here is critical.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Issue #2976

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 7 2015, 12:54 AM
Parents
rG33b6dbbc51c7: Document zfs_flags module parameter
Branches
Unknown
Tags
Unknown