summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}