diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:08 -0400 |
commit | 93b49d45eb97574057ee03dfdd590c209f5132f8 (patch) | |
tree | d01e5af58331ab6a8c758e445aeb943cf803dfa9 /drivers/scsi | |
parent | f9f51cc0ce544224a8332a4c1733624fcbc70a32 (diff) | |
parent | b0c4f3222c7406f0aee9d52b7d604a1d36108463 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (22 commits)
Fix the race between capifs remount and node creation
Fix races around the access to ->s_options
switch ufs directories to ufs_sync_file()
Switch open_exec() and sys_uselib() to do_open_filp()
Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
Reduce path_lookup() abuses
Make checkpatch.pl shut up on fs/inode.c
NULL noise in fs/super.c:kill_bdev_super()
romfs: cleanup romfs_fs.h
ROMFS: romfs_dev_read() error ignored
fs: dcache fix LRU ordering
ocfs2: Use nd_set_link().
Fix deadlock in ipathfs ->get_sb()
Fix a leak in failure exit in 9p ->get_sb()
Convert obvious places to deactivate_locked_super()
New helper: deactivate_locked_super()
reiserfs: remove privroot hiding in lookup
reiserfs: dont associate security.* with xattr files
reiserfs: fixup xattr_root caching
Always lookup priv_root on reiserfs mount and keep it
...
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/osd/osd_uld.c | 20 |
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 | ||
176 | struct osd_dev *osduld_path_lookup(const char *path) | 176 | struct 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 | ||
222 | out: | 222 | out: |
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 | } |
226 | EXPORT_SYMBOL(osduld_path_lookup); | 226 | EXPORT_SYMBOL(osduld_path_lookup); |