aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-18 04:15:09 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-18 04:15:35 -0400
commit1079cac0f4eb7d968395378b1625979d4c818dd6 (patch)
treed261058d95d27fe7250511d5fad69db30dc17731 /drivers/scsi
parent5872144f64b34a5942f6b4acedc90b02de72c58b (diff)
parent1406de8e11eb043681297adf86d6892ff8efc27a (diff)
Merge commit 'v2.6.30-rc6' into tracing/core
Merge reason: we were on an -rc4 base, sync up to -rc6 Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/osd/osd_uld.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index f644c9571eab..22b59e13ba83 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -173,26 +173,26 @@ static const struct file_operations osd_fops = {
173 .unlocked_ioctl = osd_uld_ioctl, 173 .unlocked_ioctl = osd_uld_ioctl,
174}; 174};
175 175
176struct osd_dev *osduld_path_lookup(const char *path) 176struct osd_dev *osduld_path_lookup(const char *name)
177{ 177{
178 struct nameidata nd; 178 struct path path;
179 struct inode *inode; 179 struct inode *inode;
180 struct cdev *cdev; 180 struct cdev *cdev;
181 struct osd_uld_device *uninitialized_var(oud); 181 struct osd_uld_device *uninitialized_var(oud);
182 int error; 182 int error;
183 183
184 if (!path || !*path) { 184 if (!name || !*name) {
185 OSD_ERR("Mount with !path || !*path\n"); 185 OSD_ERR("Mount with !path || !*path\n");
186 return ERR_PTR(-EINVAL); 186 return ERR_PTR(-EINVAL);
187 } 187 }
188 188
189 error = path_lookup(path, LOOKUP_FOLLOW, &nd); 189 error = kern_path(name, LOOKUP_FOLLOW, &path);
190 if (error) { 190 if (error) {
191 OSD_ERR("path_lookup of %s faild=>%d\n", path, error); 191 OSD_ERR("path_lookup of %s failed=>%d\n", name, error);
192 return ERR_PTR(error); 192 return ERR_PTR(error);
193 } 193 }
194 194
195 inode = nd.path.dentry->d_inode; 195 inode = path.dentry->d_inode;
196 error = -EINVAL; /* Not the right device e.g osd_uld_device */ 196 error = -EINVAL; /* Not the right device e.g osd_uld_device */
197 if (!S_ISCHR(inode->i_mode)) { 197 if (!S_ISCHR(inode->i_mode)) {
198 OSD_DEBUG("!S_ISCHR()\n"); 198 OSD_DEBUG("!S_ISCHR()\n");
@@ -202,15 +202,15 @@ struct osd_dev *osduld_path_lookup(const char *path)
202 cdev = inode->i_cdev; 202 cdev = inode->i_cdev;
203 if (!cdev) { 203 if (!cdev) {
204 OSD_ERR("Before mounting an OSD Based filesystem\n"); 204 OSD_ERR("Before mounting an OSD Based filesystem\n");
205 OSD_ERR(" user-mode must open+close the %s device\n", path); 205 OSD_ERR(" user-mode must open+close the %s device\n", name);
206 OSD_ERR(" Example: bash: echo < %s\n", path); 206 OSD_ERR(" Example: bash: echo < %s\n", name);
207 goto out; 207 goto out;
208 } 208 }
209 209
210 /* The Magic wand. Is it our char-dev */ 210 /* The Magic wand. Is it our char-dev */
211 /* TODO: Support sg devices */ 211 /* TODO: Support sg devices */
212 if (cdev->owner != THIS_MODULE) { 212 if (cdev->owner != THIS_MODULE) {
213 OSD_ERR("Error mounting %s - is not an OSD device\n", path); 213 OSD_ERR("Error mounting %s - is not an OSD device\n", name);
214 goto out; 214 goto out;
215 } 215 }
216 216
@@ -220,7 +220,7 @@ struct osd_dev *osduld_path_lookup(const char *path)
220 error = 0; 220 error = 0;
221 221
222out: 222out:
223 path_put(&nd.path); 223 path_put(&path);
224 return error ? ERR_PTR(error) : &oud->od; 224 return error ? ERR_PTR(error) : &oud->od;
225} 225}
226EXPORT_SYMBOL(osduld_path_lookup); 226EXPORT_SYMBOL(osduld_path_lookup);