diff options
author | Gary Bisson <gary.bisson@boundarydevices.com> | 2015-09-07 11:20:07 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-09-11 17:15:29 -0400 |
commit | 9d2f6a9ae70d06e4cead539e57f264c980643f53 (patch) | |
tree | d85aaa31c4bc3b74c713b21ed3c7a6dc625e7c41 | |
parent | 40372244f206fcf94eadfcd1d063185373d5d25d (diff) | |
download | u-boot-imx-9d2f6a9ae70d06e4cead539e57f264c980643f53.zip u-boot-imx-9d2f6a9ae70d06e4cead539e57f264c980643f53.tar.gz u-boot-imx-9d2f6a9ae70d06e4cead539e57f264c980643f53.tar.bz2 |
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 <gary.bisson@boundarydevices.com>
-rw-r--r-- | fs/ext4/ext4_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 410419e..727a2f7 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; } |