diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 9b0380100047cc0974de71c487f01b4b5c7514eb..2da4ace4f53667738d0197decc66c48073ac09fc 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4614,8 +4614,9 @@ class LUNodeQueryvols(NoHooksLU):
                        selected=self.op.output_fields)
 
   def ExpandNames(self):
+    self.share_locks = _ShareAll()
     self.needed_locks = {}
-    self.share_locks[locking.LEVEL_NODE] = 1
+
     if not self.op.nodes:
       self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET
     else: