diff options
author | Brian Behlendorf <[email protected]> | 2012-03-22 14:47:29 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-03-22 15:43:55 -0700 |
commit | 9ed86e7cc7d0880c35f675efc2177012f01f5678 (patch) | |
tree | 7fac3ea74d0c90bc456bcbfc3aac38dfceca5215 /module/zfs/zfs_ctldir.c | |
parent | ebe7e575eae1e03b1faa545a424f008faeac589d (diff) |
Account for .zfs ctldir inodes
Because the .zfs ctldir inodes are not backed by physical storage
they use a different create path which was not properly accounting
for them as used. This could result in ->nr_cached_objects()
returning 0 and cause a divide by zero error in prune_super().
In my option there's a kernel bug here too which allows this to
happen. They should either be checking for 0 or adding +1 like
they correctly do earlier in the function.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #617
Diffstat (limited to 'module/zfs/zfs_ctldir.c')
-rw-r--r-- | module/zfs/zfs_ctldir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 01bf52fe9..1923934cd 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -212,6 +212,7 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id, mutex_enter(&zsb->z_znodes_lock); list_insert_tail(&zsb->z_all_znodes, zp); + zsb->z_nr_znodes++; membar_producer(); mutex_exit(&zsb->z_znodes_lock); |