diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-30 05:16:32 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 19:47:07 +0300 |
commit | 0d72ab35a925d66b044cb62b709e53141c3f0143 (patch) | |
tree | a0ef3340110dac004ec3ba1d1a2d7dfb1b9e7ce0 /fs/bcachefs/acl.c | |
parent | 84f1638795da1ff2084597de4251e9054f1ad728 (diff) | |
download | linux-0d72ab35a925d66b044cb62b709e53141c3f0143.tar.xz |
bcachefs: make RO snapshots actually RO
Add checks to all the VFS paths for "are we in a RO snapshot?".
Note - we don't check this when setting inode options via our xattr
interface, since those generally only affect data placement, not
contents of data.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Reported-by: "Carl E. Thompson" <list-bcachefs@carlthompson.net>
Diffstat (limited to 'fs/bcachefs/acl.c')
-rw-r--r-- | fs/bcachefs/acl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c index f3809897f00a..3640f417cce1 100644 --- a/fs/bcachefs/acl.c +++ b/fs/bcachefs/acl.c @@ -366,7 +366,8 @@ retry: bch2_trans_begin(trans); acl = _acl; - ret = bch2_inode_peek(trans, &inode_iter, &inode_u, inode_inum(inode), + ret = bch2_subvol_is_ro_trans(trans, inode->ei_subvol) ?: + bch2_inode_peek(trans, &inode_iter, &inode_u, inode_inum(inode), BTREE_ITER_INTENT); if (ret) goto btree_err; |