Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146931
b: refs/heads/master
c: f6eb534
h: refs/heads/master
i:
  146929: 8c88458
  146927: fb26920
v: v3
  • Loading branch information
Steven Whitehouse committed May 26, 2009
1 parent e5bfb44 commit a9357d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1b28aab5804aa477c33d19855d6747607a885fd
refs/heads/master: f6eb53498ee8f725832f3a0fffca90566bb118a6
52 changes: 1 addition & 51 deletions trunk/fs/gfs2/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,44 +411,6 @@ static struct attribute *lock_module_attrs[] = {
NULL,
};

#define ARGS_ATTR(name, fmt) \
static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \
{ \
return snprintf(buf, PAGE_SIZE, fmt, sdp->sd_args.ar_##name); \
} \
static struct gfs2_attr args_attr_##name = __ATTR_RO(name)

ARGS_ATTR(lockproto, "%s\n");
ARGS_ATTR(locktable, "%s\n");
ARGS_ATTR(hostdata, "%s\n");
ARGS_ATTR(spectator, "%d\n");
ARGS_ATTR(ignore_local_fs, "%d\n");
ARGS_ATTR(localcaching, "%d\n");
ARGS_ATTR(localflocks, "%d\n");
ARGS_ATTR(debug, "%d\n");
ARGS_ATTR(upgrade, "%d\n");
ARGS_ATTR(posix_acl, "%d\n");
ARGS_ATTR(quota, "%u\n");
ARGS_ATTR(suiddir, "%d\n");
ARGS_ATTR(data, "%d\n");

static struct attribute *args_attrs[] = {
&args_attr_lockproto.attr,
&args_attr_locktable.attr,
&args_attr_hostdata.attr,
&args_attr_spectator.attr,
&args_attr_ignore_local_fs.attr,
&args_attr_localcaching.attr,
&args_attr_localflocks.attr,
&args_attr_debug.attr,
&args_attr_upgrade.attr,
&args_attr_posix_acl.attr,
&args_attr_quota.attr,
&args_attr_suiddir.attr,
&args_attr_data.attr,
NULL,
};

/*
* get and set struct gfs2_tune fields
*/
Expand Down Expand Up @@ -545,11 +507,6 @@ static struct attribute *tune_attrs[] = {
NULL,
};

static struct attribute_group args_group = {
.name = "args",
.attrs = args_attrs,
};

static struct attribute_group tune_group = {
.name = "tune",
.attrs = tune_attrs,
Expand All @@ -570,13 +527,9 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
if (error)
goto fail;

error = sysfs_create_group(&sdp->sd_kobj, &args_group);
if (error)
goto fail_reg;

error = sysfs_create_group(&sdp->sd_kobj, &tune_group);
if (error)
goto fail_args;
goto fail_reg;

error = sysfs_create_group(&sdp->sd_kobj, &lock_module_group);
if (error)
Expand All @@ -587,8 +540,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)

fail_tune:
sysfs_remove_group(&sdp->sd_kobj, &tune_group);
fail_args:
sysfs_remove_group(&sdp->sd_kobj, &args_group);
fail_reg:
kobject_put(&sdp->sd_kobj);
fail:
Expand All @@ -599,7 +550,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
void gfs2_sys_fs_del(struct gfs2_sbd *sdp)
{
sysfs_remove_group(&sdp->sd_kobj, &tune_group);
sysfs_remove_group(&sdp->sd_kobj, &args_group);
sysfs_remove_group(&sdp->sd_kobj, &lock_module_group);
kobject_put(&sdp->sd_kobj);
}
Expand Down

0 comments on commit a9357d4

Please sign in to comment.