Project

General

Profile

Bug #6385

Fix unlocking order in zfs_zget

Added by Richard Yao about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-10-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

We release a buffer before releasing a lock when we should release the lock first for two reasons. The first is to ensure that we do not hold the lock any longer than necessary. The second is unlock in the inverse order of locking for consistency. A patch to fix this has been ported from ZoL:

https://github.com/openzfs/openzfs/pull/6
https://github.com/zfsonlinux/zfs/commit/f3ad9cd67ae57760a7ec9e8cdb0e33aa8bbea4d0

#1

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit eaef6a96de3f6afbbccc69bd7a0aed4463689d0a

commit  eaef6a96de3f6afbbccc69bd7a0aed4463689d0a
Author: Richard Yao <ryao@gentoo.org>
Date:   2015-10-29T22:20:47.000Z

    6385 Fix unlocking order in zfs_zget
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Andriy Gapon <avg@freebsd.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF