aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/sys.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 94bd59ec54e2..23419dc3027b 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -411,44 +411,6 @@ static struct attribute *lock_module_attrs[] = {
411 NULL, 411 NULL,
412}; 412};
413 413
414#define ARGS_ATTR(name, fmt) \
415static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \
416{ \
417 return snprintf(buf, PAGE_SIZE, fmt, sdp->sd_args.ar_##name); \
418} \
419static struct gfs2_attr args_attr_##name = __ATTR_RO(name)
420
421ARGS_ATTR(lockproto, "%s\n");
422ARGS_ATTR(locktable, "%s\n");
423ARGS_ATTR(hostdata, "%s\n");
424ARGS_ATTR(spectator, "%d\n");
425ARGS_ATTR(ignore_local_fs, "%d\n");
426ARGS_ATTR(localcaching, "%d\n");
427ARGS_ATTR(localflocks, "%d\n");
428ARGS_ATTR(debug, "%d\n");
429ARGS_ATTR(upgrade, "%d\n");
430ARGS_ATTR(posix_acl, "%d\n");
431ARGS_ATTR(quota, "%u\n");
432ARGS_ATTR(suiddir, "%d\n");
433ARGS_ATTR(data, "%d\n");
434
435static struct attribute *args_attrs[] = {
436 &args_attr_lockproto.attr,
437 &args_attr_locktable.attr,
438 &args_attr_hostdata.attr,
439 &args_attr_spectator.attr,
440 &args_attr_ignore_local_fs.attr,
441 &args_attr_localcaching.attr,
442 &args_attr_localflocks.attr,
443 &args_attr_debug.attr,
444 &args_attr_upgrade.attr,
445 &args_attr_posix_acl.attr,
446 &args_attr_quota.attr,
447 &args_attr_suiddir.attr,
448 &args_attr_data.attr,
449 NULL,
450};
451
452/* 414/*
453 * get and set struct gfs2_tune fields 415 * get and set struct gfs2_tune fields
454 */ 416 */
@@ -545,11 +507,6 @@ static struct attribute *tune_attrs[] = {
545 NULL, 507 NULL,
546}; 508};
547 509
548static struct attribute_group args_group = {
549 .name = "args",
550 .attrs = args_attrs,
551};
552
553static struct attribute_group tune_group = { 510static struct attribute_group tune_group = {
554 .name = "tune", 511 .name = "tune",
555 .attrs = tune_attrs, 512 .attrs = tune_attrs,
@@ -570,13 +527,9 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
570 if (error) 527 if (error)
571 goto fail; 528 goto fail;
572 529
573 error = sysfs_create_group(&sdp->sd_kobj, &args_group);
574 if (error)
575 goto fail_reg;
576
577 error = sysfs_create_group(&sdp->sd_kobj, &tune_group); 530 error = sysfs_create_group(&sdp->sd_kobj, &tune_group);
578 if (error) 531 if (error)
579 goto fail_args; 532 goto fail_reg;
580 533
581 error = sysfs_create_group(&sdp->sd_kobj, &lock_module_group); 534 error = sysfs_create_group(&sdp->sd_kobj, &lock_module_group);
582 if (error) 535 if (error)
@@ -587,8 +540,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
587 540
588fail_tune: 541fail_tune:
589 sysfs_remove_group(&sdp->sd_kobj, &tune_group); 542 sysfs_remove_group(&sdp->sd_kobj, &tune_group);
590fail_args:
591 sysfs_remove_group(&sdp->sd_kobj, &args_group);
592fail_reg: 543fail_reg:
593 kobject_put(&sdp->sd_kobj); 544 kobject_put(&sdp->sd_kobj);
594fail: 545fail:
@@ -599,7 +550,6 @@ fail:
599void gfs2_sys_fs_del(struct gfs2_sbd *sdp) 550void gfs2_sys_fs_del(struct gfs2_sbd *sdp)
600{ 551{
601 sysfs_remove_group(&sdp->sd_kobj, &tune_group); 552 sysfs_remove_group(&sdp->sd_kobj, &tune_group);
602 sysfs_remove_group(&sdp->sd_kobj, &args_group);
603 sysfs_remove_group(&sdp->sd_kobj, &lock_module_group); 553 sysfs_remove_group(&sdp->sd_kobj, &lock_module_group);
604 kobject_put(&sdp->sd_kobj); 554 kobject_put(&sdp->sd_kobj);
605} 555}