linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / sparc64 / kernel / sys_sunos32.c
index ac6079f..058a6a7 100644 (file)
@@ -156,7 +156,7 @@ asmlinkage int sunos_brk(u32 baddr)
         * simple, it hopefully works in most obvious cases.. Easy to
         * fool it, but this should catch most mistakes.
         */
-       freepages = global_page_state(NR_FILE_PAGES);
+       freepages = get_page_cache_size();
        freepages >>= 1;
        freepages += nr_free_pages();
        freepages += nr_swap_pages;
@@ -281,20 +281,16 @@ static int sunos_filldir(void * __buf, const char * name, int namlen,
        struct sunos_dirent __user *dirent;
        struct sunos_dirent_callback * buf = (struct sunos_dirent_callback *) __buf;
        int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
-       u32 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;
        dirent = buf->previous;
        if (dirent)
                put_user(offset, &dirent->d_off);
        dirent = buf->curr;
        buf->previous = dirent;
-       put_user(d_ino, &dirent->d_ino);
+       put_user(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))
@@ -368,18 +364,14 @@ static int sunos_filldirentry(void * __buf, const char * name, int namlen,
        struct sunos_direntry_callback * buf =
                (struct sunos_direntry_callback *) __buf;
        int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
-       u32 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;
        dirent = buf->previous;
        dirent = buf->curr;
        buf->previous = dirent;
-       put_user(d_ino, &dirent->d_ino);
+       put_user(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))