Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow dnode allocation if dn_holds != 0 #8249

Merged
merged 1 commit into from Jan 10, 2019

Conversation

tcaputi
Copy link
Contributor

@tcaputi tcaputi commented Jan 7, 2019

This patch simply fixes a small bug where dnode_hold_impl() could
attempt to allocate a dnode that was in the process of being freed,
but which still had active references. This patch simply adds the
required check.

Signed-off-by: Tom Caputi tcaputi@datto.com

How Has This Been Tested?

This problem was found and the fix was confirmed using ztest.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

This patch simply fixes a small bug where dnode_hold_impl() could
attempt to allocate a dnode that was in the process of being freed,
but which still had active references. This patch simply adds the
required check.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jan 7, 2019
@codecov
Copy link

codecov bot commented Jan 8, 2019

Codecov Report

Merging #8249 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8249      +/-   ##
==========================================
- Coverage   78.56%   78.51%   -0.05%     
==========================================
  Files         379      379              
  Lines      114924   114899      -25     
==========================================
- Hits        90286    90215      -71     
- Misses      24638    24684      +46
Flag Coverage Δ
#kernel 79.01% <100%> (+0.17%) ⬆️
#user 67.32% <100%> (-0.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c87db59...11ab7d5. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 8, 2019
@behlendorf behlendorf merged commit 58769a4 into openzfs:master Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants