From: Gary Bisson Date: Mon, 7 Sep 2015 09:20:07 +0000 (+0200) Subject: fs: ext4: fix symlink read function X-Git-Tag: v2015.10-rc4~105 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9d2f6a9ae70d06e4cead539e57f264c980643f53;p=u-boot 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. Signed-off-by: Gary Bisson --- diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 410419e241..727a2f753d 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -2046,7 +2046,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; }