aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_znode.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-07-15 13:29:57 -0700
committerBrian Behlendorf <[email protected]>2014-07-17 15:15:07 -0700
commit1e8db7710220332808920a582e5794d6fc37b109 (patch)
tree5480855f5bc841e32703bc7cf4f0835b212f3077 /include/sys/zfs_znode.h
parenta5778ea2427bd340e3b4f697d9b6e1452bd71909 (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/zfs_znode.h')
-rw-r--r--include/sys/zfs_znode.h1
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 *,