lkml.org 
[lkml]   [2003]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectPATCH: add new settings locks to ide-proc
Date
From
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.61/drivers/ide/ide-proc.c linux-2.5.61-ac2/drivers/ide/ide-proc.c
--- linux-2.5.61/drivers/ide/ide-proc.c 2003-02-10 18:38:42.000000000 +0000
+++ linux-2.5.61-ac2/drivers/ide/ide-proc.c 2003-02-18 18:06:17.000000000 +0000
@@ -434,6 +454,7 @@
char *out = page;
int len, rc, mul_factor, div_factor;

+ down(&ide_setting_sem);
out += sprintf(out, "name\t\t\tvalue\t\tmin\t\tmax\t\tmode\n");
out += sprintf(out, "----\t\t\t-----\t\t---\t\t---\t\t----\n");
while(setting) {
@@ -453,6 +474,7 @@
setting = setting->next;
}
len = out - page;
+ up(&ide_setting_sem);
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}

@@ -521,12 +543,17 @@
--n;
++p;
}
+
+ down(&ide_setting_sem);
setting = ide_find_setting_by_name(drive, name);
if (!setting)
+ {
+ up(&ide_setting_sem);
goto parse_error;
-
+ }
if (for_real)
ide_write_setting(drive, setting, val * setting->div_factor / setting->mul_factor);
+ up(&ide_setting_sem);
}
} while (!for_real++);
return count;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.029 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site