aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/xattr.c')
-rw-r--r--fs/bcachefs/xattr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c
index dfb5c385e8c3..f31eec2f1fce 100644
--- a/fs/bcachefs/xattr.c
+++ b/fs/bcachefs/xattr.c
@@ -515,7 +515,14 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
}
mutex_lock(&inode->ei_update_lock);
+ if (inode_opt_id == Inode_opt_project) {
+ ret = bch2_set_projid(c, inode, s.v);
+ if (ret)
+ goto err;
+ }
+
ret = bch2_write_inode(c, inode, inode_opt_set_fn, &s, 0);
+err:
mutex_unlock(&inode->ei_update_lock);
if (value &&