[syslinux:elflink] xfs: Make sure that the dinode is read with success
syslinux-bot for Paulo Alcantara
pcacjr at zytor.com
Tue Nov 27 12:57:11 PST 2012
Commit-ID: 093b604f8e399e3d6a69f2d41ee326a6930df618
Gitweb: http://www.syslinux.org/commit/093b604f8e399e3d6a69f2d41ee326a6930df618
Author: Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Wed, 18 Jul 2012 13:00:15 -0300
Committer: Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Sat, 21 Jul 2012 01:21:47 -0300
xfs: Make sure that the dinode is read with success
xfs_next_extent() does not make sure that the dinode has been read
successfully without checking return of xfs_get_ino_core() function.
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
core/fs/xfs/xfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index b1fa5cd..e9765f8 100644
--- a/core/fs/xfs/xfs.c
+++ b/core/fs/xfs/xfs.c
@@ -210,6 +210,10 @@ static int xfs_next_extent(struct inode *inode, uint32_t lstart)
xfs_debug("in");
core = xfs_get_ino_core(fs, inode->ino);
+ if (!core) {
+ xfs_error("Failed to get dinode from disk (ino %llx)", inode->ino);
+ goto out;
+ }
if (core->di_format == XFS_DINODE_FMT_EXTENTS) {
/* The data fork contains the file's data extents */
@@ -259,7 +263,7 @@ static struct inode *xfs_iget(const char *dname, struct inode *parent)
core = xfs_get_ino_core(fs, parent->ino);
if (!core) {
- xfs_debug("Cannot get dinode from disk. ino: 0x%llx", parent->ino);
+ xfs_error("Failed to get dinode from disk (ino 0x%llx)", parent->ino);
goto out;
}
More information about the Syslinux-commits
mailing list