From 8e231e7263a0486eef92b91cc120dcadeaf63232 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Mon, 12 Jul 2004 21:30:17 -0700 Subject: [PATCH] compat_fillonedir() warning fix access_ok() expects a pointer, not unsigned long. It's not a problem on platforms that have this guy done as a macro (or ones that do not use fs/compat.c at all), but that's still wrong and on some platforms that care we actually have access_ok() as inlined function. Bogus cast removed. --- fs/compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/compat.c b/fs/compat.c index 3e8c96c9b870..07f06a3076d7 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -824,7 +824,7 @@ static int compat_fillonedir(void *__buf, const char *name, int namlen, return -EINVAL; buf->result++; dirent = buf->dirent; - if (!access_ok(VERIFY_WRITE, (unsigned long)dirent, + if (!access_ok(VERIFY_WRITE, dirent, (unsigned long)(dirent->d_name + namlen + 1) - (unsigned long)dirent)) goto efault; -- cgit v1.2.3