Explorar o código

btrfs: prop: use common helper for type to string conversion

Use the helper for conversion, keep the semantics.

Signed-off-by: David Sterba <dsterba@suse.com>
David Sterba %!s(int64=7) %!d(string=hai) anos
pai
achega
802a5c6958
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      fs/btrfs/props.c

+ 3 - 3
fs/btrfs/props.c

@@ -423,11 +423,11 @@ static const char *prop_compression_extract(struct inode *inode)
 {
 	switch (BTRFS_I(inode)->prop_compress) {
 	case BTRFS_COMPRESS_ZLIB:
-		return "zlib";
 	case BTRFS_COMPRESS_LZO:
-		return "lzo";
 	case BTRFS_COMPRESS_ZSTD:
-		return "zstd";
+		return btrfs_compress_type2str(BTRFS_I(inode)->prop_compress);
+	default:
+		break;
 	}
 
 	return NULL;