]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/base.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / fs / proc / base.c
index b5918ae8ca79a7823bd6a4d3eb0ecfc0b08d30f6..486cf3fe7139949a0911e0e33f9cb99a06bfb8fb 100644 (file)
@@ -1712,9 +1712,9 @@ static struct dentry *proc_fd_instantiate(struct inode *dir,
        file = fcheck_files(files, fd);
        if (!file)
                goto out_unlock;
-       if (file->f_mode & 1)
+       if (file->f_mode & FMODE_READ)
                inode->i_mode |= S_IRUSR | S_IXUSR;
-       if (file->f_mode & 2)
+       if (file->f_mode & FMODE_WRITE)
                inode->i_mode |= S_IWUSR | S_IXUSR;
        spin_unlock(&files->file_lock);
        put_files_struct(files);