diff options
author | David Howells <dhowells@redhat.com> | 2010-08-11 06:26:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 19:53:13 -0400 |
commit | c7887325230aec47d47a32562a6e26014a0fafca (patch) | |
tree | 10535943dace59ddb01d3440aa582bc4640e8016 /fs/utimes.c | |
parent | b84ae4a1401a731ef5fee987c0cb08743838dda7 (diff) |
Mark arguments to certain syscalls as being const
Mark arguments to certain system calls as being const where they should be but
aren't. The list includes:
(*) The filename arguments of various stat syscalls, execve(), various utimes
syscalls and some mount syscalls.
(*) The filename arguments of some syscall helpers relating to the above.
(*) The buffer argument of various write syscalls.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/utimes.c')
-rw-r--r-- | fs/utimes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/utimes.c b/fs/utimes.c index e4c75db5d373..179b58690657 100644 --- a/fs/utimes.c +++ b/fs/utimes.c | |||
@@ -126,7 +126,8 @@ out: | |||
126 | * must be owner or have write permission. | 126 | * must be owner or have write permission. |
127 | * Else, update from *times, must be owner or super user. | 127 | * Else, update from *times, must be owner or super user. |
128 | */ | 128 | */ |
129 | long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags) | 129 | long do_utimes(int dfd, const char __user *filename, struct timespec *times, |
130 | int flags) | ||
130 | { | 131 | { |
131 | int error = -EINVAL; | 132 | int error = -EINVAL; |
132 | 133 | ||
@@ -170,7 +171,7 @@ out: | |||
170 | return error; | 171 | return error; |
171 | } | 172 | } |
172 | 173 | ||
173 | SYSCALL_DEFINE4(utimensat, int, dfd, char __user *, filename, | 174 | SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, |
174 | struct timespec __user *, utimes, int, flags) | 175 | struct timespec __user *, utimes, int, flags) |
175 | { | 176 | { |
176 | struct timespec tstimes[2]; | 177 | struct timespec tstimes[2]; |
@@ -188,7 +189,7 @@ SYSCALL_DEFINE4(utimensat, int, dfd, char __user *, filename, | |||
188 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); | 189 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); |
189 | } | 190 | } |
190 | 191 | ||
191 | SYSCALL_DEFINE3(futimesat, int, dfd, char __user *, filename, | 192 | SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename, |
192 | struct timeval __user *, utimes) | 193 | struct timeval __user *, utimes) |
193 | { | 194 | { |
194 | struct timeval times[2]; | 195 | struct timeval times[2]; |