]> err.no Git - linux-2.6/blobdiff - arch/alpha/kernel/osf_sys.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
[linux-2.6] / arch / alpha / kernel / osf_sys.c
index 8a31fc1bfb15b69671f5ce335bea378d818a8d54..ad61736519950e72debd8fa691a9c59181a361a8 100644 (file)
@@ -111,22 +111,26 @@ struct osf_dirent_callback {
 
 static int
 osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
-           ino_t ino, unsigned int d_type)
+           u64 ino, unsigned int d_type)
 {
        struct osf_dirent __user *dirent;
        struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
        unsigned int reclen = ROUND_UP(NAME_OFFSET + namlen + 1);
+       unsigned int d_ino;
 
        buf->error = -EINVAL;   /* only used if we fail */
        if (reclen > buf->count)
                return -EINVAL;
+       d_ino = ino;
+       if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
+               return -EOVERFLOW;
        if (buf->basep) {
                if (put_user(offset, buf->basep))
                        return -EFAULT;
                buf->basep = NULL;
        }
        dirent = buf->dirent;
-       put_user(ino, &dirent->d_ino);
+       put_user(d_ino, &dirent->d_ino);
        put_user(namlen, &dirent->d_namlen);
        put_user(reclen, &dirent->d_reclen);
        if (copy_to_user(dirent->d_name, name, namlen) ||