diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-02 09:04:36 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 13:12:52 +0400 |
commit | 421748ecde8e69a6364e5ae66eb3bf87e1f995c0 (patch) | |
tree | 50ef878f8c46b1ec729625ed678d04aaeaaee6dd /fs/block_dev.c | |
parent | a63bb99660d82dfe7c51588e1f9aadefb756ba51 (diff) | |
download | linux-421748ecde8e69a6364e5ae66eb3bf87e1f995c0.tar.xz |
[PATCH] assorted path_lookup() -> kern_path() conversions
more nameidata eviction
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 218408eed1bb..d06fe3c3dd3f 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1268,33 +1268,33 @@ EXPORT_SYMBOL(ioctl_by_bdev); * namespace if possible and return it. Return ERR_PTR(error) * otherwise. */ -struct block_device *lookup_bdev(const char *path) +struct block_device *lookup_bdev(const char *pathname) { struct block_device *bdev; struct inode *inode; - struct nameidata nd; + struct path path; int error; - if (!path || !*path) + if (!pathname || !*pathname) return ERR_PTR(-EINVAL); - error = path_lookup(path, LOOKUP_FOLLOW, &nd); + error = kern_path(pathname, LOOKUP_FOLLOW, &path); if (error) return ERR_PTR(error); - inode = nd.path.dentry->d_inode; + inode = path.dentry->d_inode; error = -ENOTBLK; if (!S_ISBLK(inode->i_mode)) goto fail; error = -EACCES; - if (nd.path.mnt->mnt_flags & MNT_NODEV) + if (path.mnt->mnt_flags & MNT_NODEV) goto fail; error = -ENOMEM; bdev = bd_acquire(inode); if (!bdev) goto fail; out: - path_put(&nd.path); + path_put(&path); return bdev; fail: bdev = ERR_PTR(error); |