[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <946950be-482c-ef9f-404c-2ce758ba175d@huawei.com>
Date: Fri, 16 Dec 2022 09:16:29 +0800
From: ChenXiaoSong <chenxiaosong2@...wei.com>
To: Viacheslav Dubeyko <slava@...eyko.com>
CC: Bart Van Assche <bvanassche@....org>,
Andrew Morton <akpm@...ux-foundation.org>,
Aditya Garg <gargaditya08@...e.com>,
Jens Axboe <axboe@...nel.dk>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Jeff Layton <jlayton@...nel.org>, <hannes@...xchg.org>,
"Theodore Y . Ts'o" <tytso@....edu>, <muchun.song@...ux.dev>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] hfsplus: fix uninit-value in hfsplus_delete_cat()
在 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;
}
Powered by blists - more mailing lists