]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/coda/pioctl.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / fs / coda / pioctl.c
index c38a98974fb0d0797448481c3da94f9eddb53723..773f2ce9aa068e48a865c677cf07c717d408777b 100644 (file)
@@ -43,13 +43,13 @@ const struct file_operations coda_ioctl_operations = {
 /* the coda pioctl inode ops */
 static int coda_ioctl_permission(struct inode *inode, int mask)
 {
-        return 0;
+       return (mask & MAY_EXEC) ? -EACCES : 0;
 }
 
 static int coda_pioctl(struct inode * inode, struct file * filp, 
                        unsigned int cmd, unsigned long user_data)
 {
-       struct nameidata nd;
+       struct path path;
         int error;
        struct PioctlData data;
         struct inode *target_inode = NULL;
@@ -64,21 +64,21 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
          * Look up the pathname. Note that the pathname is in 
          * user memory, and namei takes care of this
          */
-        if ( data.follow ) {
-                error = user_path_walk(data.path, &nd);
+        if (data.follow) {
+                error = user_path(data.path, &path);
        } else {
-               error = user_path_walk_link(data.path, &nd);
+               error = user_lpath(data.path, &path);
        }
                
        if ( error ) {
                return error;
         } else {
-               target_inode = nd.path.dentry->d_inode;
+               target_inode = path.dentry->d_inode;
        }
        
        /* return if it is not a Coda inode */
        if ( target_inode->i_sb != inode->i_sb ) {
-               path_put(&nd.path);
+               path_put(&path);
                return  -EINVAL;
        }
 
@@ -87,7 +87,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
 
        error = venus_pioctl(inode->i_sb, &(cnp->c_fid), cmd, &data);
 
-       path_put(&nd.path);
+       path_put(&path);
         return error;
 }