hfsplus: Initialize directory subfolders in hfsplus_mknod
Subsystems (2)
hfsplus: Initialize directory subfolders in hfsplus_mknod
Addresses uninitialized subfolders attribute being used in hfsplus_subfolders_inc and hfsplus_subfolders_dec.
Reported-by [email protected]
Signed-off-by Siddharth Menon <[email protected]>
--- fs/hfsplus/dir.c | 3 +++ 1 file changed, 3 insertions(+)
fs/hfsplus/dir.c +3 -0
@@ -485,6 +485,9 @@ static int hfsplus_mknod(struct mnt_idmap *idmap, struct inode *dir,mutex_lock (&sbi->vh_mutex); inode =hfsplus_new_inode (dir->i_sb, dir, mode); +if (test_bit (HFSPLUS_SB_HFSX , &sbi->flags)) +HFSPLUS_I (dir)->subfolders =0 ; +if (!inode) goto out;
Signature · 1 line
2.39.2
Quoted 1 line · Siddharth Menon
hfsplus: Initialize directory subfolders in
hfsplus_mknod
Shouldn't this be in the subject line only?
And no [PATCH]?
Quoted 1 line
Addresses uninitialized subfolders attribute being used in
hfsplus_subfolders_incandhfsplus_subfolders_dec.
Linewrap please.
Quoted 8 lines
Reported-by [email protected]Signed-off-by Siddharth Menon <[email protected]>--- fs/hfsplus/dir.c | 3 +++ 1 file changed, 3 insertions(+)
As this is a v2 patch, you must describe below the --- line what changed from the first one.
thanks,
greg k-h