Skip to content

Commit

Permalink
dm: sysfs add empty release function to avoid debug warning
Browse files Browse the repository at this point in the history
This patch just removes an unnecessary warning:
 kobject: 'dm': does not have a release() function,
 it is broken and must be fixed.

The kobject is embedded in mapped device struct, so
code does not need to release memory explicitly here.

Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Milan Broz authored and kergon committed Dec 10, 2009
1 parent 613978f commit d2bb7df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/md/dm-sysfs.c
Expand Up @@ -79,13 +79,21 @@ static struct sysfs_ops dm_sysfs_ops = {
.show = dm_attr_show,
};

/*
* The sysfs structure is embedded in md struct, nothing to do here
*/
static void dm_sysfs_release(struct kobject *kobj)
{
}

/*
* dm kobject is embedded in mapped_device structure
* no need to define release function here
*/
static struct kobj_type dm_ktype = {
.sysfs_ops = &dm_sysfs_ops,
.default_attrs = dm_attrs,
.release = dm_sysfs_release
};

/*
Expand Down

0 comments on commit d2bb7df

Please sign in to comment.