summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorGary Bisson <gary.bisson@boundarydevices.com>2015-09-07 11:20:07 +0200
committerDongjin Kim <tobetter@gmail.com>2019-01-29 02:48:01 +0900
commitde2e3e9e2f64e50d6e91c7f7e9a530fa0f18bb7f (patch)
tree26289ac3b9b9979806e546615607e91a540b1ce7 /fs
parentdedf718464647b7d80b7e1682430b373a2d69002 (diff)
downloadu-boot-odroid-c1-de2e3e9e2f64e50d6e91c7f7e9a530fa0f18bb7f.tar.gz
fs: ext4: fix symlink read function
Since last API changes for files >2GB, the read of symlink is broken as ext4fs_read_file now returns 0 instead of the length of the actual read. Change-Id: Ieafd3d0154c064228a66925a841fdc09c712dd9b Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index cab5465b9d..ff10a84e96 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2040,7 +2040,7 @@ static char *ext4fs_read_symlink(struct ext2fs_node *node)
status = ext4fs_read_file(diro, 0,
__le32_to_cpu(diro->inode.size),
symlink, &actread);
- if (status == 0) {
+ if ((status < 0) || (actread == 0)) {
free(symlink);
return 0;
}