Skip to content

Commit 6575b8c

Browse files
author
Kent Overstreet
committed
bcachefs: Fix locking in bch2_ioc_setlabel()
Fixes: 7a25405 ("bcachefs: support FS_IOC_SETFSLABEL") Reported-by: [email protected] Signed-off-by: Kent Overstreet <[email protected]>
1 parent 5dbfc4e commit 6575b8c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/bcachefs/fs-ioctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,8 @@ static int bch2_ioc_setlabel(struct bch_fs *c,
328328

329329
mutex_lock(&c->sb_lock);
330330
strscpy(c->disk_sb.sb->label, label, BCH_SB_LABEL_SIZE);
331-
mutex_unlock(&c->sb_lock);
332-
333331
ret = bch2_write_super(c);
332+
mutex_unlock(&c->sb_lock);
334333

335334
mnt_drop_write_file(file);
336335
return ret;

0 commit comments

Comments
 (0)