Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Fixed the problem when setting zero_stats to 1 twice. #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Driver/enhanceio/eio_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ eio_zerostats_sysctl(struct ctl_table *table, int write, void __user *buffer,
return -EINVAL;
}

if (dmc->sysctl_pending.zerostats ==
dmc->sysctl_active.zerostats)
/* same value. Nothing to work */
if (!dmc->sysctl_pending.zerostats)
/* if 0 do nothing */
return 0;

/* Copy to active */
Expand Down Expand Up @@ -1055,7 +1054,7 @@ static struct sysctl_table_common {
{ /* 1 */
.procname = "zero_stats",
.maxlen = sizeof(int),
.mode = 0644,
.mode = 0200,
.proc_handler = &eio_zerostats_sysctl,
}, { /* 2 */
.procname = "mem_limit_pct",
Expand Down