]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/export.c
ocfs2: Provide convenience function for ino lookup
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / export.c
index bc48177bd183eac14ae94ff2c1f787d6ce013649..c3bbc198f9ce66d6a0c4bf2b02bb581932e12ee1 100644 (file)
@@ -88,8 +88,6 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
        struct dentry *parent;
        struct inode *inode;
        struct inode *dir = child->d_inode;
-       struct buffer_head *dirent_bh = NULL;
-       struct ocfs2_dir_entry *dirent;
 
        mlog_entry("(0x%p, '%.*s')\n", child,
                   child->d_name.len, child->d_name.name);
@@ -105,8 +103,7 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
                goto bail;
        }
 
-       status = ocfs2_find_files_on_disk("..", 2, &blkno, dir, &dirent_bh,
-                                         &dirent);
+       status = ocfs2_lookup_ino_from_name(dir, "..", 2, &blkno);
        if (status < 0) {
                parent = ERR_PTR(-ENOENT);
                goto bail_unlock;
@@ -131,9 +128,6 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
 bail_unlock:
        ocfs2_meta_unlock(dir, 0);
 
-       if (dirent_bh)
-               brelse(dirent_bh);
-
 bail:
        mlog_exit_ptr(parent);