#define PC_KOBJ_ID "pc"
#define STATS_KOBJ_ID "stats"
-struct orangefs_obj {
- struct kobject kobj;
- int op_timeout_secs;
- int perf_counter_reset;
- int perf_history_size;
- int perf_time_interval_secs;
- int slot_timeout_secs;
- int dcache_timeout_msecs;
- int getattr_timeout_msecs;
-};
-
-struct acache_orangefs_obj {
- struct kobject kobj;
- int hard_limit;
- int reclaim_percentage;
- int soft_limit;
- int timeout_msecs;
-};
-
-struct capcache_orangefs_obj {
- struct kobject kobj;
- int hard_limit;
- int reclaim_percentage;
- int soft_limit;
- int timeout_secs;
-};
-
-struct ccache_orangefs_obj {
- struct kobject kobj;
- int hard_limit;
- int reclaim_percentage;
- int soft_limit;
- int timeout_secs;
-};
-
-struct ncache_orangefs_obj {
- struct kobject kobj;
- int hard_limit;
- int reclaim_percentage;
- int soft_limit;
- int timeout_msecs;
-};
-
-struct pc_orangefs_obj {
- struct kobject kobj;
- char *acache;
- char *capcache;
- char *ncache;
-};
-
-struct stats_orangefs_obj {
- struct kobject kobj;
- int reads;
- int writes;
-};
-
struct orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+ ssize_t (*show)(struct orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+ ssize_t (*store)(struct orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct acache_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct acache_orangefs_obj *acache_orangefs_obj,
- struct acache_orangefs_attribute *attr,
+ ssize_t (*show)(struct acache_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct acache_orangefs_obj *acache_orangefs_obj,
- struct acache_orangefs_attribute *attr,
+ ssize_t (*store)(struct acache_orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct capcache_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct capcache_orangefs_obj *capcache_orangefs_obj,
- struct capcache_orangefs_attribute *attr,
+ ssize_t (*show)(struct capcache_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct capcache_orangefs_obj *capcache_orangefs_obj,
- struct capcache_orangefs_attribute *attr,
+ ssize_t (*store)(struct capcache_orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct ccache_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct ccache_orangefs_obj *ccache_orangefs_obj,
- struct ccache_orangefs_attribute *attr,
+ ssize_t (*show)(struct ccache_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct ccache_orangefs_obj *ccache_orangefs_obj,
- struct ccache_orangefs_attribute *attr,
+ ssize_t (*store)(struct ccache_orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct ncache_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct ncache_orangefs_obj *ncache_orangefs_obj,
- struct ncache_orangefs_attribute *attr,
+ ssize_t (*show)(struct ncache_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct ncache_orangefs_obj *ncache_orangefs_obj,
- struct ncache_orangefs_attribute *attr,
+ ssize_t (*store)(struct ncache_orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct pc_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct pc_orangefs_obj *pc_orangefs_obj,
- struct pc_orangefs_attribute *attr,
+ ssize_t (*show)(struct pc_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct pc_orangefs_obj *pc_orangefs_obj,
- struct pc_orangefs_attribute *attr,
+ ssize_t (*store)(struct pc_orangefs_attribute *attr,
const char *buf,
size_t count);
};
struct stats_orangefs_attribute {
struct attribute attr;
- ssize_t (*show)(struct stats_orangefs_obj *stats_orangefs_obj,
- struct stats_orangefs_attribute *attr,
+ ssize_t (*show)(struct stats_orangefs_attribute *attr,
char *buf);
- ssize_t (*store)(struct stats_orangefs_obj *stats_orangefs_obj,
- struct stats_orangefs_attribute *attr,
+ ssize_t (*store)(struct stats_orangefs_attribute *attr,
const char *buf,
size_t count);
};
char *buf)
{
struct orangefs_attribute *attribute;
- struct orangefs_obj *orangefs_obj;
int rc;
attribute = container_of(attr, struct orangefs_attribute, attr);
- orangefs_obj = container_of(kobj, struct orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
size_t len)
{
struct orangefs_attribute *attribute;
- struct orangefs_obj *orangefs_obj;
int rc;
gossip_debug(GOSSIP_SYSFS_DEBUG,
"orangefs_attr_store: start\n");
attribute = container_of(attr, struct orangefs_attribute, attr);
- orangefs_obj = container_of(kobj, struct orangefs_obj, kobj);
if (!attribute->store) {
rc = -EIO;
goto out;
}
- rc = attribute->store(orangefs_obj, attribute, buf, len);
+ rc = attribute->store(attribute, buf, len);
out:
return rc;
char *buf)
{
struct acache_orangefs_attribute *attribute;
- struct acache_orangefs_obj *acache_orangefs_obj;
int rc;
attribute = container_of(attr, struct acache_orangefs_attribute, attr);
- acache_orangefs_obj =
- container_of(kobj, struct acache_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(acache_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
size_t len)
{
struct acache_orangefs_attribute *attribute;
- struct acache_orangefs_obj *acache_orangefs_obj;
int rc;
gossip_debug(GOSSIP_SYSFS_DEBUG,
"acache_orangefs_attr_store: start\n");
attribute = container_of(attr, struct acache_orangefs_attribute, attr);
- acache_orangefs_obj =
- container_of(kobj, struct acache_orangefs_obj, kobj);
if (!attribute->store) {
rc = -EIO;
goto out;
}
- rc = attribute->store(acache_orangefs_obj, attribute, buf, len);
+ rc = attribute->store(attribute, buf, len);
out:
return rc;
char *buf)
{
struct capcache_orangefs_attribute *attribute;
- struct capcache_orangefs_obj *capcache_orangefs_obj;
int rc;
attribute =
container_of(attr, struct capcache_orangefs_attribute, attr);
- capcache_orangefs_obj =
- container_of(kobj, struct capcache_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(capcache_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
size_t len)
{
struct capcache_orangefs_attribute *attribute;
- struct capcache_orangefs_obj *capcache_orangefs_obj;
int rc;
gossip_debug(GOSSIP_SYSFS_DEBUG,
attribute =
container_of(attr, struct capcache_orangefs_attribute, attr);
- capcache_orangefs_obj =
- container_of(kobj, struct capcache_orangefs_obj, kobj);
if (!attribute->store) {
rc = -EIO;
goto out;
}
- rc = attribute->store(capcache_orangefs_obj, attribute, buf, len);
+ rc = attribute->store(attribute, buf, len);
out:
return rc;
char *buf)
{
struct ccache_orangefs_attribute *attribute;
- struct ccache_orangefs_obj *ccache_orangefs_obj;
int rc;
attribute =
container_of(attr, struct ccache_orangefs_attribute, attr);
- ccache_orangefs_obj =
- container_of(kobj, struct ccache_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(ccache_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
size_t len)
{
struct ccache_orangefs_attribute *attribute;
- struct ccache_orangefs_obj *ccache_orangefs_obj;
int rc;
gossip_debug(GOSSIP_SYSFS_DEBUG,
attribute =
container_of(attr, struct ccache_orangefs_attribute, attr);
- ccache_orangefs_obj =
- container_of(kobj, struct ccache_orangefs_obj, kobj);
if (!attribute->store) {
rc = -EIO;
goto out;
}
- rc = attribute->store(ccache_orangefs_obj, attribute, buf, len);
+ rc = attribute->store(attribute, buf, len);
out:
return rc;
char *buf)
{
struct ncache_orangefs_attribute *attribute;
- struct ncache_orangefs_obj *ncache_orangefs_obj;
int rc;
attribute = container_of(attr, struct ncache_orangefs_attribute, attr);
- ncache_orangefs_obj =
- container_of(kobj, struct ncache_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(ncache_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
size_t len)
{
struct ncache_orangefs_attribute *attribute;
- struct ncache_orangefs_obj *ncache_orangefs_obj;
int rc;
gossip_debug(GOSSIP_SYSFS_DEBUG,
"ncache_orangefs_attr_store: start\n");
attribute = container_of(attr, struct ncache_orangefs_attribute, attr);
- ncache_orangefs_obj =
- container_of(kobj, struct ncache_orangefs_obj, kobj);
if (!attribute->store) {
rc = -EIO;
goto out;
}
- rc = attribute->store(ncache_orangefs_obj, attribute, buf, len);
+ rc = attribute->store(attribute, buf, len);
out:
return rc;
char *buf)
{
struct pc_orangefs_attribute *attribute;
- struct pc_orangefs_obj *pc_orangefs_obj;
int rc;
attribute = container_of(attr, struct pc_orangefs_attribute, attr);
- pc_orangefs_obj =
- container_of(kobj, struct pc_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(pc_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
char *buf)
{
struct stats_orangefs_attribute *attribute;
- struct stats_orangefs_obj *stats_orangefs_obj;
int rc;
attribute = container_of(attr, struct stats_orangefs_attribute, attr);
- stats_orangefs_obj =
- container_of(kobj, struct stats_orangefs_obj, kobj);
if (!attribute->show) {
rc = -EIO;
goto out;
}
- rc = attribute->show(stats_orangefs_obj, attribute, buf);
+ rc = attribute->show(attribute, buf);
out:
return rc;
.show = stats_orangefs_attr_show,
};
-static void orangefs_release(struct kobject *kobj)
-{
- struct orangefs_obj *orangefs_obj;
-
- orangefs_obj = container_of(kobj, struct orangefs_obj, kobj);
- kfree(orangefs_obj);
-}
-
-static void acache_orangefs_release(struct kobject *kobj)
-{
- struct acache_orangefs_obj *acache_orangefs_obj;
-
- acache_orangefs_obj =
- container_of(kobj, struct acache_orangefs_obj, kobj);
- kfree(acache_orangefs_obj);
-}
-
-static void capcache_orangefs_release(struct kobject *kobj)
-{
- struct capcache_orangefs_obj *capcache_orangefs_obj;
-
- capcache_orangefs_obj =
- container_of(kobj, struct capcache_orangefs_obj, kobj);
- kfree(capcache_orangefs_obj);
-}
-
-static void ccache_orangefs_release(struct kobject *kobj)
-{
- struct ccache_orangefs_obj *ccache_orangefs_obj;
-
- ccache_orangefs_obj =
- container_of(kobj, struct ccache_orangefs_obj, kobj);
- kfree(ccache_orangefs_obj);
-}
-
-static void ncache_orangefs_release(struct kobject *kobj)
-{
- struct ncache_orangefs_obj *ncache_orangefs_obj;
-
- ncache_orangefs_obj =
- container_of(kobj, struct ncache_orangefs_obj, kobj);
- kfree(ncache_orangefs_obj);
-}
-
-static void pc_orangefs_release(struct kobject *kobj)
-{
- struct pc_orangefs_obj *pc_orangefs_obj;
-
- pc_orangefs_obj =
- container_of(kobj, struct pc_orangefs_obj, kobj);
- kfree(pc_orangefs_obj);
-}
-
-static void stats_orangefs_release(struct kobject *kobj)
-{
- struct stats_orangefs_obj *stats_orangefs_obj;
-
- stats_orangefs_obj =
- container_of(kobj, struct stats_orangefs_obj, kobj);
- kfree(stats_orangefs_obj);
-}
-
static ssize_t sysfs_int_show(char *kobj_id, char *buf, void *attr)
{
int rc = -EIO;
return rc;
}
-static ssize_t int_orangefs_show(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+static ssize_t int_orangefs_show(struct orangefs_attribute *attr,
char *buf)
{
int rc;
return rc;
}
-static ssize_t int_stats_show(struct stats_orangefs_obj *stats_orangefs_obj,
- struct stats_orangefs_attribute *attr,
+static ssize_t int_stats_show(struct stats_orangefs_attribute *attr,
char *buf)
{
int rc;
return rc;
}
-static ssize_t int_store(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+static ssize_t int_store(struct orangefs_attribute *attr,
const char *buf,
size_t count)
{
}
-static ssize_t service_orangefs_show(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+static ssize_t service_orangefs_show(struct orangefs_attribute *attr,
char *buf)
{
int rc = 0;
}
static ssize_t
- service_acache_show(struct acache_orangefs_obj *acache_orangefs_obj,
- struct acache_orangefs_attribute *attr,
+ service_acache_show(struct acache_orangefs_attribute *attr,
char *buf)
{
int rc = 0;
return rc;
}
-static ssize_t service_capcache_show(struct capcache_orangefs_obj
- *capcache_orangefs_obj,
- struct capcache_orangefs_attribute *attr,
+static ssize_t service_capcache_show(struct capcache_orangefs_attribute *attr,
char *buf)
{
int rc = 0;
return rc;
}
-static ssize_t service_ccache_show(struct ccache_orangefs_obj
- *ccache_orangefs_obj,
- struct ccache_orangefs_attribute *attr,
+static ssize_t service_ccache_show(struct ccache_orangefs_attribute *attr,
char *buf)
{
int rc = 0;
}
static ssize_t
- service_ncache_show(struct ncache_orangefs_obj *ncache_orangefs_obj,
- struct ncache_orangefs_attribute *attr,
+ service_ncache_show(struct ncache_orangefs_attribute *attr,
char *buf)
{
int rc = 0;
}
static ssize_t
- service_pc_show(struct pc_orangefs_obj *pc_orangefs_obj,
- struct pc_orangefs_attribute *attr,
+ service_pc_show(struct pc_orangefs_attribute *attr,
char *buf)
{
int rc = 0;
}
static ssize_t
- service_orangefs_store(struct orangefs_obj *orangefs_obj,
- struct orangefs_attribute *attr,
+ service_orangefs_store(struct orangefs_attribute *attr,
const char *buf,
size_t count)
{
}
static ssize_t
- service_acache_store(struct acache_orangefs_obj *acache_orangefs_obj,
- struct acache_orangefs_attribute *attr,
+ service_acache_store(struct acache_orangefs_attribute *attr,
const char *buf,
size_t count)
{
}
static ssize_t
- service_capcache_store(struct capcache_orangefs_obj
- *capcache_orangefs_obj,
- struct capcache_orangefs_attribute *attr,
+ service_capcache_store(struct capcache_orangefs_attribute *attr,
const char *buf,
size_t count)
{
return rc;
}
-static ssize_t service_ccache_store(struct ccache_orangefs_obj
- *ccache_orangefs_obj,
- struct ccache_orangefs_attribute *attr,
+static ssize_t service_ccache_store(struct ccache_orangefs_attribute *attr,
const char *buf,
size_t count)
{
}
static ssize_t
- service_ncache_store(struct ncache_orangefs_obj *ncache_orangefs_obj,
- struct ncache_orangefs_attribute *attr,
+ service_ncache_store(struct ncache_orangefs_attribute *attr,
const char *buf,
size_t count)
{
static struct kobj_type orangefs_ktype = {
.sysfs_ops = &orangefs_sysfs_ops,
- .release = orangefs_release,
.default_attrs = orangefs_default_attrs,
};
static struct kobj_type acache_orangefs_ktype = {
.sysfs_ops = &acache_orangefs_sysfs_ops,
- .release = acache_orangefs_release,
.default_attrs = acache_orangefs_default_attrs,
};
static struct kobj_type capcache_orangefs_ktype = {
.sysfs_ops = &capcache_orangefs_sysfs_ops,
- .release = capcache_orangefs_release,
.default_attrs = capcache_orangefs_default_attrs,
};
static struct kobj_type ccache_orangefs_ktype = {
.sysfs_ops = &ccache_orangefs_sysfs_ops,
- .release = ccache_orangefs_release,
.default_attrs = ccache_orangefs_default_attrs,
};
static struct kobj_type ncache_orangefs_ktype = {
.sysfs_ops = &ncache_orangefs_sysfs_ops,
- .release = ncache_orangefs_release,
.default_attrs = ncache_orangefs_default_attrs,
};
static struct kobj_type pc_orangefs_ktype = {
.sysfs_ops = &pc_orangefs_sysfs_ops,
- .release = pc_orangefs_release,
.default_attrs = pc_orangefs_default_attrs,
};
static struct kobj_type stats_orangefs_ktype = {
.sysfs_ops = &stats_orangefs_sysfs_ops,
- .release = stats_orangefs_release,
.default_attrs = stats_orangefs_default_attrs,
};
-static struct orangefs_obj *orangefs_obj;
-static struct acache_orangefs_obj *acache_orangefs_obj;
-static struct capcache_orangefs_obj *capcache_orangefs_obj;
-static struct ccache_orangefs_obj *ccache_orangefs_obj;
-static struct ncache_orangefs_obj *ncache_orangefs_obj;
-static struct pc_orangefs_obj *pc_orangefs_obj;
-static struct stats_orangefs_obj *stats_orangefs_obj;
+static struct kobject *orangefs_obj;
+static struct kobject *acache_orangefs_obj;
+static struct kobject *capcache_orangefs_obj;
+static struct kobject *ccache_orangefs_obj;
+static struct kobject *ncache_orangefs_obj;
+static struct kobject *pc_orangefs_obj;
+static struct kobject *stats_orangefs_obj;
int orangefs_sysfs_init(void)
{
if (!orangefs_obj)
goto out;
- rc = kobject_init_and_add(&orangefs_obj->kobj,
+ rc = kobject_init_and_add(orangefs_obj,
&orangefs_ktype,
fs_kobj,
ORANGEFS_KOBJ_ID);
if (rc)
goto ofs_obj_bail;
- kobject_uevent(&orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/acache. */
acache_orangefs_obj = kzalloc(sizeof(*acache_orangefs_obj), GFP_KERNEL);
goto ofs_obj_bail;
}
- rc = kobject_init_and_add(&acache_orangefs_obj->kobj,
+ rc = kobject_init_and_add(acache_orangefs_obj,
&acache_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
ACACHE_KOBJ_ID);
if (rc)
goto acache_obj_bail;
- kobject_uevent(&acache_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(acache_orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/capcache. */
capcache_orangefs_obj =
goto acache_obj_bail;
}
- rc = kobject_init_and_add(&capcache_orangefs_obj->kobj,
+ rc = kobject_init_and_add(capcache_orangefs_obj,
&capcache_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
CAPCACHE_KOBJ_ID);
if (rc)
goto capcache_obj_bail;
- kobject_uevent(&capcache_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(capcache_orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/ccache. */
ccache_orangefs_obj =
goto capcache_obj_bail;
}
- rc = kobject_init_and_add(&ccache_orangefs_obj->kobj,
+ rc = kobject_init_and_add(ccache_orangefs_obj,
&ccache_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
CCACHE_KOBJ_ID);
if (rc)
goto ccache_obj_bail;
- kobject_uevent(&ccache_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(ccache_orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/ncache. */
ncache_orangefs_obj = kzalloc(sizeof(*ncache_orangefs_obj), GFP_KERNEL);
goto ccache_obj_bail;
}
- rc = kobject_init_and_add(&ncache_orangefs_obj->kobj,
+ rc = kobject_init_and_add(ncache_orangefs_obj,
&ncache_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
NCACHE_KOBJ_ID);
if (rc)
goto ncache_obj_bail;
- kobject_uevent(&ncache_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(ncache_orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/perf_counters. */
pc_orangefs_obj = kzalloc(sizeof(*pc_orangefs_obj), GFP_KERNEL);
goto ncache_obj_bail;
}
- rc = kobject_init_and_add(&pc_orangefs_obj->kobj,
+ rc = kobject_init_and_add(pc_orangefs_obj,
&pc_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
"perf_counters");
if (rc)
goto pc_obj_bail;
- kobject_uevent(&pc_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(pc_orangefs_obj, KOBJ_ADD);
/* create /sys/fs/orangefs/stats. */
stats_orangefs_obj = kzalloc(sizeof(*stats_orangefs_obj), GFP_KERNEL);
goto pc_obj_bail;
}
- rc = kobject_init_and_add(&stats_orangefs_obj->kobj,
+ rc = kobject_init_and_add(stats_orangefs_obj,
&stats_orangefs_ktype,
- &orangefs_obj->kobj,
+ orangefs_obj,
STATS_KOBJ_ID);
if (rc)
goto stats_obj_bail;
- kobject_uevent(&stats_orangefs_obj->kobj, KOBJ_ADD);
+ kobject_uevent(stats_orangefs_obj, KOBJ_ADD);
goto out;
stats_obj_bail:
- kobject_put(&stats_orangefs_obj->kobj);
-
+ kobject_put(stats_orangefs_obj);
pc_obj_bail:
- kobject_put(&pc_orangefs_obj->kobj);
-
+ kobject_put(pc_orangefs_obj);
ncache_obj_bail:
- kobject_put(&ncache_orangefs_obj->kobj);
-
+ kobject_put(ncache_orangefs_obj);
ccache_obj_bail:
- kobject_put(&ccache_orangefs_obj->kobj);
-
+ kobject_put(ccache_orangefs_obj);
capcache_obj_bail:
- kobject_put(&capcache_orangefs_obj->kobj);
-
+ kobject_put(capcache_orangefs_obj);
acache_obj_bail:
- kobject_put(&acache_orangefs_obj->kobj);
-
+ kobject_put(acache_orangefs_obj);
ofs_obj_bail:
- kobject_put(&orangefs_obj->kobj);
+ kobject_put(orangefs_obj);
out:
return rc;
}
void orangefs_sysfs_exit(void)
{
gossip_debug(GOSSIP_SYSFS_DEBUG, "orangefs_sysfs_exit: start\n");
-
- kobject_put(&acache_orangefs_obj->kobj);
- kobject_put(&capcache_orangefs_obj->kobj);
- kobject_put(&ccache_orangefs_obj->kobj);
- kobject_put(&ncache_orangefs_obj->kobj);
- kobject_put(&pc_orangefs_obj->kobj);
- kobject_put(&stats_orangefs_obj->kobj);
-
- kobject_put(&orangefs_obj->kobj);
+ kobject_put(acache_orangefs_obj);
+ kobject_put(capcache_orangefs_obj);
+ kobject_put(ccache_orangefs_obj);
+ kobject_put(ncache_orangefs_obj);
+ kobject_put(pc_orangefs_obj);
+ kobject_put(stats_orangefs_obj);
+ kobject_put(orangefs_obj);
}