[syslinux:elflink] xfs: Only call fill_xfs_inode_pvt() if dinode was read
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue Nov 27 12:57:11 PST 2012
Commit-ID: d6ffc9d1c04fa2a1cb63b7441d1747bb32bba2dd
Gitweb: http://www.syslinux.org/commit/d6ffc9d1c04fa2a1cb63b7441d1747bb32bba2dd
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Fri, 20 Jul 2012 21:08:55 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sat, 21 Jul 2012 01:21:47 -0300
xfs: Only call fill_xfs_inode_pvt() if dinode was read
It does not make any sense to fill in private inode information when the
requested dinode has not been read successfully.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index e9765f8..1bd4187 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -160,12 +160,13 @@ found:
xfs_debug("entry inode's number %lu", ino);
ncore = xfs_get_ino_core(fs, ino);
- fill_xfs_inode_pvt(inode, fs, ino);
if (!ncore) {
xfs_error("Failed to get dinode!");
goto out;
}
+ fill_xfs_inode_pvt(inode, fs, ino);
+
inode->ino = ino;
XFS_PVT(inode)->i_ino_blk = ino_to_bytes(fs, ino) >> BLOCK_SHIFT(fs);
inode->size = be64_to_cpu(ncore->di_size);
@@ -300,13 +301,14 @@ static struct inode *xfs_iget_root(struct fs_info *fs)
xfs_debug("Looking for the root inode...");
core = xfs_get_ino_core(fs, XFS_INFO(fs)->rootino);
- fill_xfs_inode_pvt(inode, fs, XFS_INFO(fs)->rootino);
if (!core) {
xfs_error("Inode core's magic number does not match!");
xfs_debug("magic number 0x%04x", be16_to_cpu(core->di_magic));
goto out;
}
+ fill_xfs_inode_pvt(inode, fs, XFS_INFO(fs)->rootino);
+
xfs_debug("Root inode has been found!");
if (!(be16_to_cpu(core->di_mode) & S_IFDIR)) {
More information about the Syslinux-commits
mailing list