diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-09-11 15:22:06 -0700 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-10-12 11:54:38 -0700 |
commit | be94d11704ef79030fd2e6a0c41b4a7f65f9e860 (patch) | |
tree | 10b060625c464db127210acc00e8aa80b43ce6f3 /fs/ocfs2/namei.c | |
parent | 0bfbbf62a8b5a129ba2c689283bfece80a601aba (diff) | |
download | op-kernel-dev-be94d11704ef79030fd2e6a0c41b4a7f65f9e860.zip op-kernel-dev-be94d11704ef79030fd2e6a0c41b4a7f65f9e860.tar.gz |
ocfs2: Provide convenience function for ino lookup
A couple paths which needed to just match a parent dir + name pair to an
inode number were a bit messy because they had to deal with
ocfs2_find_files_on_disk() which returns a larger number of values. Provide
a convenience function, ocfs2_lookup_ino_from_name() which internalizes all
the extra accounting.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r-- | fs/ocfs2/namei.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index aae6c0b..98aeebc 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -101,10 +101,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, { int status; u64 blkno; - struct buffer_head *dirent_bh = NULL; struct inode *inode = NULL; struct dentry *ret; - struct ocfs2_dir_entry *dirent; struct ocfs2_inode_info *oi; mlog_entry("(0x%p, 0x%p, '%.*s')\n", dir, dentry, @@ -126,9 +124,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, goto bail; } - status = ocfs2_find_files_on_disk(dentry->d_name.name, - dentry->d_name.len, &blkno, - dir, &dirent_bh, &dirent); + status = ocfs2_lookup_ino_from_name(dir, dentry->d_name.name, + dentry->d_name.len, &blkno); if (status < 0) goto bail_add; @@ -183,8 +180,6 @@ bail_unlock: ocfs2_meta_unlock(dir, 0); bail: - if (dirent_bh) - brelse(dirent_bh); mlog_exit_ptr(ret); |