projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dbfc4e
)
bcachefs: Fix locking in bch2_ioc_setlabel()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Tue, 20 Aug 2024 23:31:20 +0000
(19:31 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 22 Aug 2024 06:07:23 +0000
(
02:07
-0400)
Fixes:
7a254053a590
("bcachefs: support FS_IOC_SETFSLABEL")
Reported-by: syzbot+7e9efdfec27fbde0141d@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-ioctl.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/fs-ioctl.c
b/fs/bcachefs/fs-ioctl.c
index
aea8132
..
99c7fe9
100644
(file)
--- a/
fs/bcachefs/fs-ioctl.c
+++ b/
fs/bcachefs/fs-ioctl.c
@@
-328,9
+328,8
@@
static int bch2_ioc_setlabel(struct bch_fs *c,
mutex_lock(&c->sb_lock);
strscpy(c->disk_sb.sb->label, label, BCH_SB_LABEL_SIZE);
- mutex_unlock(&c->sb_lock);
-
ret = bch2_write_super(c);
+ mutex_unlock(&c->sb_lock);
mnt_drop_write_file(file);
return ret;