summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorGary Bisson <gary.bisson@boundarydevices.com>2015-09-07 11:20:07 +0200
committerTom Rini <trini@konsulko.com>2015-09-11 17:15:29 -0400
commit9d2f6a9ae70d06e4cead539e57f264c980643f53 (patch)
treed85aaa31c4bc3b74c713b21ed3c7a6dc625e7c41 /fs/ext4
parent40372244f206fcf94eadfcd1d063185373d5d25d (diff)
downloadtalos-obmc-uboot-9d2f6a9ae70d06e4cead539e57f264c980643f53.tar.gz
talos-obmc-uboot-9d2f6a9ae70d06e4cead539e57f264c980643f53.zip
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>
Diffstat (limited to 'fs/ext4')
-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 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;
}
OpenPOWER on IntegriCloud