File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -552,6 +552,14 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
552
552
s .v = v + 1 ;
553
553
s .defined = true;
554
554
} else {
555
+ /*
556
+ * Check if this option was set on the parent - if so, switched
557
+ * back to inheriting from the parent:
558
+ *
559
+ * rename() also has to deal with keeping inherited options up
560
+ * to date - see bch2_reinherit_attrs()
561
+ */
562
+ spin_lock (& dentry -> d_lock );
555
563
if (!IS_ROOT (dentry )) {
556
564
struct bch_inode_info * dir =
557
565
to_bch_ei (d_inode (dentry -> d_parent ));
@@ -560,6 +568,7 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
560
568
} else {
561
569
s .v = 0 ;
562
570
}
571
+ spin_unlock (& dentry -> d_lock );
563
572
564
573
s .defined = false;
565
574
}
You can’t perform that action at this time.
0 commit comments