diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-07-15 16:22:37 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-07-15 18:41:03 -0400 |
commit | 8471005b9fadfccd4c848ad71c899b90793b554d (patch) | |
tree | 92012871d9d0b2086c09d9d31a9f30252fd28bb8 /libbcachefs/compress.c | |
parent | 9becf21b43af0091a81b07f927f7527190508d1f (diff) |
Update bcachefs sources to deeffbdc52f1 bcachefs: better device too small error message
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/compress.c')
-rw-r--r-- | libbcachefs/compress.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libbcachefs/compress.c b/libbcachefs/compress.c index 5f74de92..aeb9b9bd 100644 --- a/libbcachefs/compress.c +++ b/libbcachefs/compress.c @@ -579,23 +579,17 @@ static int __bch2_check_set_has_compressed_data(struct bch_fs *c, u64 f) if ((c->sb.features & f) == f) return 0; - mutex_lock(&c->sb_lock); + guard(mutex)(&c->sb_lock); - if ((c->sb.features & f) == f) { - mutex_unlock(&c->sb_lock); + if ((c->sb.features & f) == f) return 0; - } ret = __bch2_fs_compress_init(c, c->sb.features|f); - if (ret) { - mutex_unlock(&c->sb_lock); + if (ret) return ret; - } c->disk_sb.sb->features[0] |= cpu_to_le64(f); bch2_write_super(c); - mutex_unlock(&c->sb_lock); - return 0; } |