Skip to content

Commit

Permalink
dsl_dir_tempreserve_impl: remove unused deferred variable
Browse files Browse the repository at this point in the history
The following commit moved the users of `deferred` into function
dsl_pool_unreserved_space:

    commit d2734cc
    Author: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
    Date:   Fri Dec 16 14:11:29 2016 -0800

        OpenZFS 9166 - zfs storage pool checkpoint

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com>
Closes openzfs#13056
  • Loading branch information
cschwarz-nutanix authored and tonyhutter committed Feb 16, 2022
1 parent fa1f8b1 commit 9f4538d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions module/zfs/dsl_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,6 @@ dsl_dir_tempreserve_impl(dsl_dir_t *dd, uint64_t asize, boolean_t netfree,
* we're very close to full, this will allow a steady trickle of
* removes to get through.
*/
uint64_t deferred = 0;
if (dd->dd_parent == NULL) {
uint64_t avail = dsl_pool_unreserved_space(dd->dd_pool,
(netfree) ?
Expand All @@ -1340,7 +1339,7 @@ dsl_dir_tempreserve_impl(dsl_dir_t *dd, uint64_t asize, boolean_t netfree,
*/
if (used_on_disk + est_inflight >= quota) {
if (est_inflight > 0 || used_on_disk < quota ||
(retval == ENOSPC && used_on_disk < quota + deferred))
(retval == ENOSPC && used_on_disk < quota))
retval = ERESTART;
dprintf_dd(dd, "failing: used=%lluK inflight = %lluK "
"quota=%lluK tr=%lluK err=%d\n",
Expand Down

0 comments on commit 9f4538d

Please sign in to comment.