[syslinux:elflink] xfs: Add xfs_fmt_local_find_entry() function

syslinux-bot for Paulo Alcantara pcacjr at zytor.com
Tue Nov 27 12:57:21 PST 2012


Commit-ID:  7e2035895279842297e1a4bb6e0424071ecc2814
Gitweb:     http://www.syslinux.org/commit/7e2035895279842297e1a4bb6e0424071ecc2814
Author:     Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Sat, 28 Jul 2012 17:21:10 -0300
Committer:  Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sat, 28 Jul 2012 18:10:19 -0300

xfs: Add xfs_fmt_local_find_entry() function

Do not call xfs_dir2_local_find_entry() directly. As there is a
xfs_fmt_extents_find_entry() which lookups entries in inodes (with format
"extents") in a generic way, we can have a xfs_fmt_local_find_entry()
function which lookups entries in inodes (with format "local") in a
generic way too.

Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>

---
 core/fs/xfs/xfs.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index 9bd278d..defd809 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -123,13 +123,18 @@ out:
     return -1;
 }
 
-static struct inode *xfs_fmt_extents_find_entry(const char *dname,
-						struct inode *parent,
-						xfs_dinode_t *core)
+static inline struct inode *xfs_fmt_local_find_entry(const char *dname,
+						     struct inode *parent,
+						     xfs_dinode_t *core)
 {
-    struct inode *inode;
+    return xfs_dir2_local_find_entry(dname, parent, core);
+}
 
-    xfs_debug("parent ino %llu", parent->ino);
+static inline struct inode *xfs_fmt_extents_find_entry(const char *dname,
+						       struct inode *parent,
+						       xfs_dinode_t *core)
+{
+    struct inode *inode;
 
     if (be32_to_cpu(core->di_nextents) <= 1) {
         /* Single-block Directories */
@@ -160,7 +165,7 @@ static struct inode *xfs_iget(const char *dname, struct inode *parent)
     }
 
     if (core->di_format == XFS_DINODE_FMT_LOCAL) {
-	inode = xfs_dir2_local_find_entry(dname, parent, core);
+	inode = xfs_fmt_local_find_entry(dname, parent, core);
     } else if (core->di_format == XFS_DINODE_FMT_EXTENTS) {
         inode = xfs_fmt_extents_find_entry(dname, parent, core);
     } else {


More information about the Syslinux-commits mailing list