Re: [PATCH v2 2/2] hfsplus: fix uninit-value in hfsplus_delete_cat()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2022/12/16 3:03, Viacheslav Dubeyko 写道:

Maybe, I am missing something. But where in the second version of the patch
initialization of subfolders?


The first patch of the patchset factor out hfsplus_init_inode() from hfsplus_new_inode():

void hfsplus_init_inode(struct hfsplus_inode_info *hip)
{
        INIT_LIST_HEAD(&hip->open_dir_list);
        spin_lock_init(&hip->open_dir_lock);
        mutex_init(&hip->extents_lock);
        atomic_set(&hip->opencnt, 0);
        hip->extent_state = 0;
        hip->flags = 0;
        hip->userflags = 0;
        hip->subfolders = 0; /* I am here */
        memset(hip->first_extents, 0, sizeof(hfsplus_extent_rec));
        memset(hip->cached_extents, 0, sizeof(hfsplus_extent_rec));
        hip->alloc_blocks = 0;
        hip->first_blocks = 0;
        hip->cached_start = 0;
        hip->cached_blocks = 0;
        hip->phys_size = 0;
        hip->fs_blocks = 0;
        hip->rsrc_inode = NULL;
}



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux