When executing 'btrfs pro get' on a file which is not compressed, return
value will always be 50 since prop_compress() return -ENOATTR.
But this should be ignored and other prop_XXX() returns 0, so when
prop_compress() is executed on uncompress file, it should return 0.
Signed-off-by: Qu Wenruo <quwenro@xxxxxxxxxxxxxx>
---
props.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/props.c b/props.c
index 4d0aeea..49ee982 100644
--- a/props.c
+++ b/props.c
@@ -146,6 +146,7 @@ static int prop_compression(enum prop_object_type type,
fprintf(stderr,
"ERROR: failed to %s compression for %s. %s\n",
value ? "set" : "get", object, strerror(-ret));
+ ret = 0;
goto out;
}
if (!value) {
--
1.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html