mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Fix snapshots with dirty inodes
Filesystems which are mounted read-only or are immutable because they are snapshots must not be allowed to dirty and inode. This will result in a write which will correctly cause a kernel panic because these filesystem are (and must be) immutable. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2812
This commit is contained in:
parent
80c50365c2
commit
c944be5d7e
@ -3975,6 +3975,9 @@ zfs_dirty_inode(struct inode *ip, int flags)
|
||||
int error;
|
||||
int cnt = 0;
|
||||
|
||||
if (zfs_is_readonly(zsb) || dmu_objset_is_snapshot(zsb->z_os))
|
||||
return (0);
|
||||
|
||||
ZFS_ENTER(zsb);
|
||||
ZFS_VERIFY_ZP(zp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user