diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-05-12 21:05:59 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-05-12 21:05:59 +0000 |
commit | ba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch) | |
tree | 78670a0139bf4d5ace617b29b7eba82bbc74d602 /fs/coda/pioctl.c | |
parent | b77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff) |
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'fs/coda/pioctl.c')
-rw-r--r-- | fs/coda/pioctl.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c index 533e83a54..d29c18ccd 100644 --- a/fs/coda/pioctl.c +++ b/fs/coda/pioctl.c @@ -73,7 +73,7 @@ int coda_ioctl_release(struct inode *i, struct file *f) static int coda_pioctl(struct inode * inode, struct file * filp, unsigned int cmd, unsigned long user_data) { - struct dentry *target_de; + struct nameidata nd; int error; struct PioctlData data; struct inode *target_inode = NULL; @@ -92,16 +92,16 @@ static int coda_pioctl(struct inode * inode, struct file * filp, CDEBUG(D_PIOCTL, "namei, data.follow = %d\n", data.follow); if ( data.follow ) { - target_de = namei(data.path); + error = user_path_walk(data.path, &nd); } else { - target_de = lnamei(data.path); + error = user_path_walk_link(data.path, &nd); } - if ( IS_ERR(target_de) ) { + if ( error ) { CDEBUG(D_PIOCTL, "error: lookup fails.\n"); - return PTR_ERR(target_de); + return error; } else { - target_inode = target_de->d_inode; + target_inode = nd.dentry->d_inode; } CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: 0x%d\n", @@ -109,8 +109,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp, /* return if it is not a Coda inode */ if ( target_inode->i_sb != inode->i_sb ) { - if ( target_de ) - dput(target_de); + path_release(&nd); return -EINVAL; } @@ -121,9 +120,8 @@ static int coda_pioctl(struct inode * inode, struct file * filp, CDEBUG(D_PIOCTL, "ioctl on inode %ld\n", target_inode->i_ino); CDEBUG(D_DOWNCALL, "dput on ino: %ld, icount %d, dcount %d\n", target_inode->i_ino, - target_inode->i_count, target_de->d_count); - if ( target_de ) - dput(target_de); + target_inode->i_count, nd.dentry->d_count); + path_release(&nd); return error; } |