staging: lustre: remove proc function wrappers

ll_proc_dointvec and ll_proc_dolongvec didn't do anything except confuse
things due to a lack of a filep variable in the functions they were used
in.  So remove them and just call the real proc functions.  This enabled
the code to be unwound a bit and a few "empty" proc handlers were
removed and just passed directly to procfs instead.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2014-07-12 21:26:09 -07:00
Родитель ceeb4aef56
Коммит 1d3ade00c6
3 изменённых файлов: 13 добавлений и 49 удалений

Просмотреть файл

@ -78,10 +78,4 @@
#define __cfs_fls __fls
#endif
#define ll_proc_dointvec(table, write, filp, buffer, lenp, ppos) \
proc_dointvec(table, write, buffer, lenp, ppos);
#define ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos) \
proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
#endif /* _PORTALS_COMPAT_H */

Просмотреть файл

@ -243,13 +243,13 @@ int proc_console_max_delay_cs(struct ctl_table *table, int write,
if (!write) { /* read */
max_delay_cs = cfs_duration_sec(libcfs_console_max_delay * 100);
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
return rc;
}
/* write */
max_delay_cs = 0;
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
if (rc < 0)
return rc;
if (max_delay_cs <= 0)
@ -275,13 +275,13 @@ int proc_console_min_delay_cs(struct ctl_table *table, int write,
if (!write) { /* read */
min_delay_cs = cfs_duration_sec(libcfs_console_min_delay * 100);
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
return rc;
}
/* write */
min_delay_cs = 0;
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
if (rc < 0)
return rc;
if (min_delay_cs <= 0)
@ -306,13 +306,13 @@ int proc_console_backoff(struct ctl_table *table, int write,
if (!write) { /* read */
backoff= libcfs_console_backoff;
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
return rc;
}
/* write */
backoff = 0;
rc = ll_proc_dointvec(&dummy, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(&dummy, write, buffer, lenp, ppos);
if (rc < 0)
return rc;
if (backoff <= 0)
@ -337,7 +337,7 @@ int proc_fail_loc(struct ctl_table *table, int write, void __user *buffer,
int rc;
long old_fail_loc = cfs_fail_loc;
rc = ll_proc_dolongvec(table, write, filp, buffer, lenp, ppos);
rc = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
if (old_fail_loc != cfs_fail_loc)
wake_up(&cfs_race_waitq);
return rc;

Просмотреть файл

@ -84,7 +84,7 @@ int proc_set_timeout(struct ctl_table *table, int write, void __user *buffer,
{
int rc;
rc = ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
rc = proc_dointvec(table, write, buffer, lenp, ppos);
if (ldlm_timeout >= obd_timeout)
ldlm_timeout = max(obd_timeout / 3, 1U);
return rc;
@ -259,36 +259,6 @@ int proc_alloc_fail_rate(struct ctl_table *table, int write,
return rc;
}
int proc_at_min(struct ctl_table *table, int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
}
int proc_at_max(struct ctl_table *table, int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
}
int proc_at_extra(struct ctl_table *table, int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
}
int proc_at_early_margin(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
}
int proc_at_history(struct ctl_table *table, int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
}
#ifdef CONFIG_SYSCTL
static struct ctl_table obd_table[] = {
{
@ -373,35 +343,35 @@ static struct ctl_table obd_table[] = {
.data = &at_min,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_at_min
.proc_handler = &proc_dointvec,
},
{
.procname = "at_max",
.data = &at_max,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_at_max
.proc_handler = &proc_dointvec,
},
{
.procname = "at_extra",
.data = &at_extra,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_at_extra
.proc_handler = &proc_dointvec,
},
{
.procname = "at_early_margin",
.data = &at_early_margin,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_at_early_margin
.proc_handler = &proc_dointvec,
},
{
.procname = "at_history",
.data = &at_history,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_at_history
.proc_handler = &proc_dointvec,
},
{}
};