summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-21 23:13:46 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:18 -0400
commit03e183cb5d429a3bb53816d70da7c19f0745909e (patch)
tree76b1c8fd41a84cfc544dca8872faa1d516ca5b17 /fs/bcachefs/fs.c
parent134915f3d38d830374603b84a9fe2e280f4814ed (diff)
downloadlwn-03e183cb5d429a3bb53816d70da7c19f0745909e.tar.gz
lwn-03e183cb5d429a3bb53816d70da7c19f0745909e.zip
bcachefs: Verify fs hasn't been modified before going rw
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r--fs/bcachefs/fs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 2f01d97470b1..2a5a90b2a781 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1682,6 +1682,7 @@ static int bch2_remount(struct super_block *sb, int *flags, char *data)
ret = bch2_fs_read_write(c);
if (ret) {
bch_err(c, "error going rw: %i", ret);
+ mutex_unlock(&c->state_lock);
return -EINVAL;
}