diff options
author | Paulo Alcantara <pcacjr@zytor.com> | 2012-07-28 17:21:10 -0300 |
---|---|---|
committer | Paulo Alcantara <pcacjr@zytor.com> | 2012-07-28 18:10:19 -0300 |
commit | 7e2035895279842297e1a4bb6e0424071ecc2814 (patch) | |
tree | 0baffd031a9cac9ad249ae80d65692e314e49a70 | |
parent | 7f421798ce904cba41a04aa29a05ae8b35c90172 (diff) | |
download | syslinux-7e2035895279842297e1a4bb6e0424071ecc2814.tar.gz syslinux-7e2035895279842297e1a4bb6e0424071ecc2814.tar.xz syslinux-7e2035895279842297e1a4bb6e0424071ecc2814.zip |
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@zytor.com>
-rw-r--r-- | core/fs/xfs/xfs.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c index 9bd278dd..defd8099 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 { |