mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
bcachefs: Fix locking in bch2_ioc_setlabel()
Fixes: 7a254053a5
("bcachefs: support FS_IOC_SETFSLABEL")
Reported-by: syzbot+7e9efdfec27fbde0141d@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
5dbfc4ef72
commit
6575b8c987
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user