projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12af982
)
ext4_xattr: fix trying to read EA block even if it is absent
author
Kaho Ng
<ngkaho1234@gmail.com>
Mon, 27 Feb 2017 14:49:53 +0000
(22:49 +0800)
committer
Kaho Ng
<ngkaho1234@gmail.com>
Mon, 27 Feb 2017 14:49:53 +0000
(22:49 +0800)
src/ext4_xattr.c
patch
|
blob
|
history
diff --git
a/src/ext4_xattr.c
b/src/ext4_xattr.c
index 6e096438de7edd24abfc78b8035b594be36c18e1..bcddefb5fd20575d7fc2daf5b1d9cd510006edc9 100644
(file)
--- a/
src/ext4_xattr.c
+++ b/
src/ext4_xattr.c
@@
-974,6
+974,13
@@
int ext4_xattr_get(struct ext4_inode_ref *inode_ref, uint8_t name_index,
}
} else {
struct ext4_block block;
+
+ /* Return ENODATA if there is no EA block */
+ if (!xattr_block) {
+ ret = ENODATA;
+ goto out;
+ }
+
block_finder.i = i;
ret = ext4_trans_block_get(fs->bdev, &block, xattr_block);
if (ret != EOK)