mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
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 <behlendorf1@llnl.gov> Closes #617
This commit is contained in:
parent
ebe7e575ea
commit
9ed86e7cc7
@ -212,6 +212,7 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
|
|||||||
|
|
||||||
mutex_enter(&zsb->z_znodes_lock);
|
mutex_enter(&zsb->z_znodes_lock);
|
||||||
list_insert_tail(&zsb->z_all_znodes, zp);
|
list_insert_tail(&zsb->z_all_znodes, zp);
|
||||||
|
zsb->z_nr_znodes++;
|
||||||
membar_producer();
|
membar_producer();
|
||||||
mutex_exit(&zsb->z_znodes_lock);
|
mutex_exit(&zsb->z_znodes_lock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user