]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/proc_sysctl.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / fs / proc / proc_sysctl.c
index 680c429bfa223e67f6097a4636f28e8efdd20d60..614c34b6d1c22214ffcdeb46a5f9e9eb63d69678 100644 (file)
@@ -9,7 +9,7 @@
 
 static struct dentry_operations proc_sys_dentry_operations;
 static const struct file_operations proc_sys_file_operations;
-static struct inode_operations proc_sys_inode_operations;
+static const struct inode_operations proc_sys_inode_operations;
 
 static void proc_sys_refresh_inode(struct inode *inode, struct ctl_table *table)
 {
@@ -171,7 +171,8 @@ static ssize_t proc_sys_read(struct file *filp, char __user *buf,
        struct dentry *dentry = filp->f_dentry;
        struct ctl_table_header *head;
        struct ctl_table *table;
-       ssize_t error, res;
+       ssize_t error;
+       size_t res;
 
        table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
        /* Has the sysctl entry disappeared on us? */
@@ -209,7 +210,8 @@ static ssize_t proc_sys_write(struct file *filp, const char __user *buf,
        struct dentry *dentry = filp->f_dentry;
        struct ctl_table_header *head;
        struct ctl_table *table;
-       ssize_t error, res;
+       ssize_t error;
+       size_t res;
 
        table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
        /* Has the sysctl entry disappeared on us? */
@@ -405,7 +407,7 @@ static int proc_sys_permission(struct inode *inode, int mask, struct nameidata *
        if (!nd || !depth)
                goto out;
 
-       dentry = nd->dentry;
+       dentry = nd->path.dentry;
        table = do_proc_sys_lookup(dentry->d_parent, &dentry->d_name, &head);
 
        /* If the entry does not exist deny permission */
@@ -444,7 +446,7 @@ static const struct file_operations proc_sys_file_operations = {
        .readdir        = proc_sys_readdir,
 };
 
-static struct inode_operations proc_sys_inode_operations = {
+static const struct inode_operations proc_sys_inode_operations = {
        .lookup         = proc_sys_lookup,
        .permission     = proc_sys_permission,
        .setattr        = proc_sys_setattr,