diff options
author | Brian Behlendorf <[email protected]> | 2014-07-15 13:29:57 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-10-09 13:56:09 -0700 |
commit | 908a0c2822f7b00f4339a6c2e8f351451a15a2be (patch) | |
tree | 8f2927b295fd3f72e952df26aca9bb6402ac9880 /include/sys | |
parent | 46bf86a9635266dd399443f5bf5c5f8d0f280aa2 (diff) |
Fix zil_commit() NULL dereference
Update the current code to ensure inodes are never dirtied if they are
part of a read-only file system or snapshot. If they do somehow get
dirtied an attempt will make made to write them to disk. In the case
of snapshots, which don't have a ZIL, this will result in a NULL
dereference in zil_commit().
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2405
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/zfs_znode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h index a0200684e..4bb8a7761 100644 --- a/include/sys/zfs_znode.h +++ b/include/sys/zfs_znode.h @@ -337,6 +337,7 @@ extern void zfs_znode_dmu_fini(znode_t *); extern int zfs_inode_alloc(struct super_block *, struct inode **ip); extern void zfs_inode_destroy(struct inode *); extern void zfs_inode_update(znode_t *); +extern void zfs_mark_inode_dirty(struct inode *); extern void zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype, znode_t *dzp, znode_t *zp, char *name, vsecattr_t *, zfs_fuid_info_t *, |