aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@zytor.com>2012-07-18 13:00:15 -0300
committerPaulo Alcantara <pcacjr@zytor.com>2012-07-21 01:21:47 -0300
commit093b604f8e399e3d6a69f2d41ee326a6930df618 (patch)
treee67e61118aba78696c15896d3f5823c02486ddbb
parentcaeea9439653d5f859abbb14672d7321ac0ef5d0 (diff)
downloadsyslinux-093b604f8e399e3d6a69f2d41ee326a6930df618.tar.gz
syslinux-093b604f8e399e3d6a69f2d41ee326a6930df618.tar.xz
syslinux-093b604f8e399e3d6a69f2d41ee326a6930df618.zip
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@zytor.com>
-rw-r--r--core/fs/xfs/xfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c
index b1fa5cdf..e9765f84 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;
}