diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-02 01:04:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:12:52 -0400 |
commit | 421748ecde8e69a6364e5ae66eb3bf87e1f995c0 (patch) | |
tree | 50ef878f8c46b1ec729625ed678d04aaeaaee6dd /fs/configfs | |
parent | a63bb99660d82dfe7c51588e1f9aadefb756ba51 (diff) |
[PATCH] assorted path_lookup() -> kern_path() conversions
more nameidata eviction
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/symlink.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index bf74973b049..932a92b3148 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c | |||
@@ -108,18 +108,18 @@ out: | |||
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
111 | static int get_target(const char *symname, struct nameidata *nd, | 111 | static int get_target(const char *symname, struct path *path, |
112 | struct config_item **target) | 112 | struct config_item **target) |
113 | { | 113 | { |
114 | int ret; | 114 | int ret; |
115 | 115 | ||
116 | ret = path_lookup(symname, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, nd); | 116 | ret = kern_path(symname, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, path); |
117 | if (!ret) { | 117 | if (!ret) { |
118 | if (nd->path.dentry->d_sb == configfs_sb) { | 118 | if (path->dentry->d_sb == configfs_sb) { |
119 | *target = configfs_get_config_item(nd->path.dentry); | 119 | *target = configfs_get_config_item(path->dentry); |
120 | if (!*target) { | 120 | if (!*target) { |
121 | ret = -ENOENT; | 121 | ret = -ENOENT; |
122 | path_put(&nd->path); | 122 | path_put(path); |
123 | } | 123 | } |
124 | } else | 124 | } else |
125 | ret = -EPERM; | 125 | ret = -EPERM; |
@@ -132,7 +132,7 @@ static int get_target(const char *symname, struct nameidata *nd, | |||
132 | int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | 132 | int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) |
133 | { | 133 | { |
134 | int ret; | 134 | int ret; |
135 | struct nameidata nd; | 135 | struct path path; |
136 | struct configfs_dirent *sd; | 136 | struct configfs_dirent *sd; |
137 | struct config_item *parent_item; | 137 | struct config_item *parent_item; |
138 | struct config_item *target_item; | 138 | struct config_item *target_item; |
@@ -159,7 +159,7 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna | |||
159 | !type->ct_item_ops->allow_link) | 159 | !type->ct_item_ops->allow_link) |
160 | goto out_put; | 160 | goto out_put; |
161 | 161 | ||
162 | ret = get_target(symname, &nd, &target_item); | 162 | ret = get_target(symname, &path, &target_item); |
163 | if (ret) | 163 | if (ret) |
164 | goto out_put; | 164 | goto out_put; |
165 | 165 | ||
@@ -174,7 +174,7 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna | |||
174 | } | 174 | } |
175 | 175 | ||
176 | config_item_put(target_item); | 176 | config_item_put(target_item); |
177 | path_put(&nd.path); | 177 | path_put(&path); |
178 | 178 | ||
179 | out_put: | 179 | out_put: |
180 | config_item_put(parent_item); | 180 | config_item_put(parent_item); |