diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-03-05 21:46:25 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:40:55 -0400 |
commit | ef1f5e7ad38e5414d016983a8cc5a8db7654a61d (patch) | |
tree | 6257477d68089b51a5dc352ef573344c42af0115 /fs/xfs/linux-2.6 | |
parent | 3937be5ba836a204d3d1df96b518eecd6cdacbb9 (diff) |
[XFS] cleanup vnode use in xfs_lookup
SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30550a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_export.c | 9 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index 21f0e8257590..66a9a9e76cbe 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c | |||
@@ -213,17 +213,16 @@ xfs_fs_get_parent( | |||
213 | struct dentry *child) | 213 | struct dentry *child) |
214 | { | 214 | { |
215 | int error; | 215 | int error; |
216 | bhv_vnode_t *cvp; | 216 | struct xfs_inode *cip; |
217 | struct dentry *parent; | 217 | struct dentry *parent; |
218 | 218 | ||
219 | cvp = NULL; | 219 | error = xfs_lookup(XFS_I(child->d_inode), &dotdot, &cip); |
220 | error = xfs_lookup(XFS_I(child->d_inode), &dotdot, &cvp); | ||
221 | if (unlikely(error)) | 220 | if (unlikely(error)) |
222 | return ERR_PTR(-error); | 221 | return ERR_PTR(-error); |
223 | 222 | ||
224 | parent = d_alloc_anon(vn_to_inode(cvp)); | 223 | parent = d_alloc_anon(cip->i_vnode); |
225 | if (unlikely(!parent)) { | 224 | if (unlikely(!parent)) { |
226 | VN_RELE(cvp); | 225 | iput(cip->i_vnode); |
227 | return ERR_PTR(-ENOMEM); | 226 | return ERR_PTR(-ENOMEM); |
228 | } | 227 | } |
229 | return parent; | 228 | return parent; |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 215158cbac43..01d9b3f1e044 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -372,13 +372,13 @@ xfs_vn_lookup( | |||
372 | struct dentry *dentry, | 372 | struct dentry *dentry, |
373 | struct nameidata *nd) | 373 | struct nameidata *nd) |
374 | { | 374 | { |
375 | bhv_vnode_t *cvp; | 375 | struct xfs_inode *cip; |
376 | int error; | 376 | int error; |
377 | 377 | ||
378 | if (dentry->d_name.len >= MAXNAMELEN) | 378 | if (dentry->d_name.len >= MAXNAMELEN) |
379 | return ERR_PTR(-ENAMETOOLONG); | 379 | return ERR_PTR(-ENAMETOOLONG); |
380 | 380 | ||
381 | error = xfs_lookup(XFS_I(dir), dentry, &cvp); | 381 | error = xfs_lookup(XFS_I(dir), dentry, &cip); |
382 | if (unlikely(error)) { | 382 | if (unlikely(error)) { |
383 | if (unlikely(error != ENOENT)) | 383 | if (unlikely(error != ENOENT)) |
384 | return ERR_PTR(-error); | 384 | return ERR_PTR(-error); |
@@ -386,7 +386,7 @@ xfs_vn_lookup( | |||
386 | return NULL; | 386 | return NULL; |
387 | } | 387 | } |
388 | 388 | ||
389 | return d_splice_alias(vn_to_inode(cvp), dentry); | 389 | return d_splice_alias(cip->i_vnode, dentry); |
390 | } | 390 | } |
391 | 391 | ||
392 | STATIC int | 392 | STATIC int |