diff options
Diffstat (limited to 'fs/bcachefs/xattr.c')
-rw-r--r-- | fs/bcachefs/xattr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c index 1d6cbe72e05b..c286f3f8859a 100644 --- a/fs/bcachefs/xattr.c +++ b/fs/bcachefs/xattr.c @@ -441,11 +441,9 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler, if (ret < 0) return ret; - if (s.id == Opt_compression) { - mutex_lock(&c->sb_lock); + if (s.id == Opt_compression || + s.id == Opt_background_compression) { ret = bch2_check_set_has_compressed_data(c, s.v); - mutex_unlock(&c->sb_lock); - if (ret) return ret; } |