History

fs: fix kernel_write prototype

Make the position an in/out argument like all the other read/write helpers and and make the buf argument a void pointer.

Christoph Hellwig committed 9 years ago

Commit e13ec931 parent bdd1d2d9 files · +19 −13Browse files

Showing the changes to kernel/sysctl_binary.c (1 of 9 files). Show all

Unified · Split

kernel/sysctl_binary.c+6−3
@@ -1017,6 +1017,7 @@ static ssize_t bin_intvec(struct file *file, · 1016 unmodified lines
10171017 size_t length = newlen / sizeof(*vec);
10181018 char *str, *end;
10191019 int i;
1020+ loff_t pos = 0;
10201021
10211022 str = buffer;
10221023 end = str + BUFSZ;
@@ -1030,7 +1031,7 @@ static ssize_t bin_intvec(struct file *file, · 7 unmodified lines
10301031 str += scnprintf(str, end - str, "%lu\t", value);
10311032 }
10321033
1033− result = kernel_write(file, buffer, str - buffer, 0);
1034+ result = kernel_write(file, buffer, str - buffer, &pos);
10341035 if (result < 0)
10351036 goto out_kfree;
10361037 }
@@ -1089,6 +1090,7 @@ static ssize_t bin_ulongvec(struct file *file, · 52 unmodified lines
10891090 size_t length = newlen / sizeof(*vec);
10901091 char *str, *end;
10911092 int i;
1093+ loff_t pos = 0;
10921094
10931095 str = buffer;
10941096 end = str + BUFSZ;
@@ -1102,7 +1104,7 @@ static ssize_t bin_ulongvec(struct file *file, · 7 unmodified lines
11021104 str += scnprintf(str, end - str, "%lu\t", value);
11031105 }
11041106
1105− result = kernel_write(file, buffer, str - buffer, 0);
1107+ result = kernel_write(file, buffer, str - buffer, &pos);
11061108 if (result < 0)
11071109 goto out_kfree;
11081110 }
@@ -1192,6 +1194,7 @@ static ssize_t bin_dn_node_address(struct file *file, · 83 unmodified lines
11921194 __le16 dnaddr;
11931195 char buf[15];
11941196 int len;
1197+ loff_t pos = 0;
11951198
11961199 result = -EINVAL;
11971200 if (newlen != sizeof(dnaddr))
@@ -1205,7 +1208,7 @@ static ssize_t bin_dn_node_address(struct file *file, · 7 unmodified lines
12051208 le16_to_cpu(dnaddr) >> 10,
12061209 le16_to_cpu(dnaddr) & 0x3ff);
12071210
1208− result = kernel_write(file, buf, len, 0);
1211+ result = kernel_write(file, buf, len, &pos);
12091212 if (result < 0)
12101213 goto out;
12111214 }