Lines Matching refs:ndns
22 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local
24 dev_WARN_ONCE(dev, !mutex_is_locked(&ndns->dev.mutex) in __nd_detach_ndns()
25 || ndns->claim != dev, in __nd_detach_ndns()
27 ndns->claim = NULL; in __nd_detach_ndns()
29 put_device(&ndns->dev); in __nd_detach_ndns()
35 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local
37 if (!ndns) in nd_detach_ndns()
39 get_device(&ndns->dev); in nd_detach_ndns()
40 device_lock(&ndns->dev); in nd_detach_ndns()
42 device_unlock(&ndns->dev); in nd_detach_ndns()
43 put_device(&ndns->dev); in nd_detach_ndns()
78 static bool is_idle(struct device *dev, struct nd_namespace_common *ndns) in is_idle() argument
88 if (seed == dev || ndns || dev->driver) in is_idle()
119 struct nd_namespace_common *ndns; in nd_namespace_store() local
140 ndns = *_ndns; in nd_namespace_store()
144 } else if (ndns) { in nd_namespace_store()
146 dev_name(&ndns->dev)); in nd_namespace_store()
159 ndns = to_ndns(found); in nd_namespace_store()
160 if (__nvdimm_namespace_capacity(ndns) < SZ_16M) { in nd_namespace_store()
167 if (!nd_attach_ndns(dev, ndns, _ndns)) { in nd_namespace_store()
169 dev_name(&ndns->dev)); in nd_namespace_store()
174 put_device(&ndns->dev); /* from device_find_child */ in nd_namespace_store()