]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/sysfile.c
ocfs2: Provide convenience function for ino lookup
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / sysfile.c
index 5df6e35d09b149ba0ecbd7547b3a21587c0c50cb..fd2e846e3e6f6a76ec5c84f0d8eb8f91d751a9ba 100644 (file)
@@ -100,17 +100,14 @@ static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb,
        char namebuf[40];
        struct inode *inode = NULL;
        u64 blkno;
-       struct buffer_head *dirent_bh = NULL;
-       struct ocfs2_dir_entry *de = NULL;
        int status = 0;
 
        ocfs2_sprintf_system_inode_name(namebuf,
                                        sizeof(namebuf),
                                        type, slot);
 
-       status = ocfs2_find_files_on_disk(namebuf, strlen(namebuf),
-                                         &blkno, osb->sys_root_inode,
-                                         &dirent_bh, &de);
+       status = ocfs2_lookup_ino_from_name(osb->sys_root_inode, namebuf,
+                                           strlen(namebuf), &blkno);
        if (status < 0) {
                goto bail;
        }
@@ -122,8 +119,7 @@ static struct inode * _ocfs2_get_system_file_inode(struct ocfs2_super *osb,
                goto bail;
        }
 bail:
-       if (dirent_bh)
-               brelse(dirent_bh);
+
        return inode;
 }