diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java index 1d59f87ab2..eac1259fb8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java @@ -233,7 +233,6 @@ public void addLock(LockLevel level, String... resources) { public void removeLock(LockLevel level, String... resources) { String lockName = generateLockName(level, resources); try (AutoCloseDataSetLock lock = writeLock(level, resources)) { - lock.lock(); lockMap.removeLock(lockName); } }