dm.c (856eb0916d181da6d043cc33e03f54d5c5bbe54a) dm.c (b9a41d21dceadf8104812626ef85dc56ee8a60ed)
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 2697 unchanged lines hidden (view full) ---

2706}
2707
2708struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
2709{
2710 struct mapped_device *md;
2711
2712 md = container_of(kobj, struct mapped_device, kobj_holder.kobj);
2713
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 2697 unchanged lines hidden (view full) ---

2706}
2707
2708struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
2709{
2710 struct mapped_device *md;
2711
2712 md = container_of(kobj, struct mapped_device, kobj_holder.kobj);
2713
2714 if (test_bit(DMF_FREEING, &md->flags) ||
2715 dm_deleting_md(md))
2716 return NULL;
2717
2714 spin_lock(&_minor_lock);
2715 if (test_bit(DMF_FREEING, &md->flags) || dm_deleting_md(md)) {
2716 md = NULL;
2717 goto out;
2718 }
2718 dm_get(md);
2719 dm_get(md);
2720out:
2721 spin_unlock(&_minor_lock);
2722
2719 return md;
2720}
2721
2722int dm_suspended_md(struct mapped_device *md)
2723{
2724 return test_bit(DMF_SUSPENDED, &md->flags);
2725}
2726

--- 278 unchanged lines hidden ---
2723 return md;
2724}
2725
2726int dm_suspended_md(struct mapped_device *md)
2727{
2728 return test_bit(DMF_SUSPENDED, &md->flags);
2729}
2730

--- 278 unchanged lines hidden ---