From: Brian Behlendorf Date: Thu, 25 Oct 2012 05:45:40 +0000 (-0700) Subject: LU-2224 osd-zfs: Fix osd_commit_async() locking X-Git-Tag: 2.3.54~9 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2eac0e35ae662ba0839b0867820608ab4800fa44 LU-2224 osd-zfs: Fix osd_commit_async() locking The ZFS osd_commit_async() function never properly acquires the tx->tx_sync_lock() mutex to protext the tx_state_t. However, the mutex is correctly dropped so we just add the obviously missing mutex_enter(). Change-Id: Iae426feaeb5885034515d6bf0ccb9509ed098bb0 Signed-off-by: Brian Behlendorf Reviewed-on: http://review.whamcloud.com/4383 Tested-by: Hudson Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Prakash Surya Tested-by: Maloo --- diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 65d69a7..5a345d6 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -383,6 +383,7 @@ static int osd_commit_async(const struct lu_env *env, struct dt_device *dev) tx_state_t *tx = &dmu_objset_pool(osd->od_objset.os)->dp_tx; uint64_t txg; + mutex_enter(&tx->tx_sync_lock); txg = tx->tx_open_txg + 1; if (tx->tx_quiesce_txg_waiting < txg) { tx->tx_quiesce_txg_waiting = txg;