]> err.no Git - linux-2.6/blobdiff - fs/proc/base.c
Fix f_version type: should be u64 instead of unsigned long
[linux-2.6] / fs / proc / base.c
index e5d0953d4db17f0b81f8f588a02b36887ff4ef5c..ea115d4c9f59145bbe70eef7c9a8476bdf2d70d7 100644 (file)
@@ -492,7 +492,7 @@ static ssize_t proc_info_read(struct file * file, char __user * buf,
                count = PROC_BLOCK_SIZE;
 
        length = -ENOMEM;
-       if (!(page = __get_free_page(GFP_KERNEL)))
+       if (!(page = __get_free_page(GFP_TEMPORARY)))
                goto out;
 
        length = PROC_I(inode)->op.proc_read(task, (char*)page);
@@ -532,7 +532,7 @@ static ssize_t mem_read(struct file * file, char __user * buf,
                goto out;
 
        ret = -ENOMEM;
-       page = (char *)__get_free_page(GFP_USER);
+       page = (char *)__get_free_page(GFP_TEMPORARY);
        if (!page)
                goto out;
 
@@ -602,7 +602,7 @@ static ssize_t mem_write(struct file * file, const char __user *buf,
                goto out;
 
        copied = -ENOMEM;
-       page = (char *)__get_free_page(GFP_USER);
+       page = (char *)__get_free_page(GFP_TEMPORARY);
        if (!page)
                goto out;
 
@@ -788,7 +788,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
                /* No partial writes. */
                return -EINVAL;
        }
-       page = (char*)__get_free_page(GFP_USER);
+       page = (char*)__get_free_page(GFP_TEMPORARY);
        if (!page)
                return -ENOMEM;
        length = -EFAULT;
@@ -954,7 +954,8 @@ static int do_proc_readlink(struct dentry *dentry, struct vfsmount *mnt,
                            char __user *buffer, int buflen)
 {
        struct inode * inode;
-       char *tmp = (char*)__get_free_page(GFP_KERNEL), *path;
+       char *tmp = (char*)__get_free_page(GFP_TEMPORARY);
+       char *path;
        int len;
 
        if (!tmp)
@@ -1726,7 +1727,7 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
                goto out;
 
        length = -ENOMEM;
-       page = (char*)__get_free_page(GFP_USER);
+       page = (char*)__get_free_page(GFP_TEMPORARY);
        if (!page)
                goto out;
 
@@ -2585,7 +2586,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
        /* f_version caches the tgid value that the last readdir call couldn't
         * return. lseek aka telldir automagically resets f_version to 0.
         */
-       tid = filp->f_version;
+       tid = (int)filp->f_version;
        filp->f_version = 0;
        for (task = first_tid(leader, tid, pos - 2);
             task;
@@ -2594,7 +2595,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
                if (proc_task_fill_cache(filp, dirent, filldir, task, tid) < 0) {
                        /* returning this tgid failed, save it as the first
                         * pid for the next readir call */
-                       filp->f_version = tid;
+                       filp->f_version = (u64)tid;
                        put_task_struct(task);
                        break;
                }