On 4/19/22 20:06, Johannes Thumshirn wrote: > On 19/04/2022 13:03, Damien Le Moal wrote: >> On 4/19/22 19:59, Johannes Thumshirn wrote: >>> On 18/04/2022 03:12, Damien Le Moal wrote: >>>> +/* >>>> + * Manage the active zone count. Called with zi->i_truncate_mutex held. >>>> + */ >>>> +static void zonefs_account_active(struct inode *inode) >>>> +{ >>>> + struct zonefs_sb_info *sbi = ZONEFS_SB(inode->i_sb); >>>> + struct zonefs_inode_info *zi = ZONEFS_I(inode); >>>> + >>> >>> Nit: lockdep_assert_held(&zi->i_truncate_mutex); >> >> If I add that, lockdep screams during mount as the inodes mutex is not >> held when the zone inodes are initialized and zonefs_account_active() >> called. We could add a wrapper function for this, but I did not feel it >> was necessary. > > OK, but then the 'Called with zi->i_truncate_mutex held.' comment is invalid > and should be removed. Not invalid. When mounting, nobody but the mount process can touch inodes, so not holding the mutex is OK. Will see how to clean this up. -- Damien Le Moal Western Digital Research