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 error;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
if (zfs_is_readonly(zsb) || dmu_objset_is_snapshot(zsb->z_os))
|
||||||
|
return (0);
|
||||||
|
|
||||||
ZFS_ENTER(zsb);
|
ZFS_ENTER(zsb);
|
||||||
ZFS_VERIFY_ZP(zp);
|
ZFS_VERIFY_ZP(zp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue