From: Greg Kroah-Hartman Date: Mon, 28 Aug 2023 10:05:24 +0000 (+0200) Subject: drop 2 exfat patches from 5.15 queue X-Git-Tag: v6.4.13~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3feb619887da02a0af0d9d6a7fde764c8c9ca8b;p=thirdparty%2Fkernel%2Fstable-queue.git drop 2 exfat patches from 5.15 queue The commit they were dependancies for is already in a 5.15.y release, so something went wrong, they aren't needed. --- diff --git a/queue-5.15/exfat-remove-argument-sector-from-exfat_get_dentry.patch b/queue-5.15/exfat-remove-argument-sector-from-exfat_get_dentry.patch deleted file mode 100644 index 9e47f7ebe90..00000000000 --- a/queue-5.15/exfat-remove-argument-sector-from-exfat_get_dentry.patch +++ /dev/null @@ -1,419 +0,0 @@ -From 13d9aff5bbf879cf6ac055cbe9acaad0459f19e4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 16 Dec 2021 21:58:37 +0900 -Subject: exfat: remove argument 'sector' from exfat_get_dentry() - -From: Yuezhang.Mo - -[ Upstream commit c71510b3fa27f96840c5737d8a47dd7b370e376c ] - -No any function uses argument 'sector', remove it. - -Reviewed-by: Andy.Wu -Reviewed-by: Aoyama, Wataru -Acked-by: Sungjong Seo -Signed-off-by: Yuezhang.Mo -Signed-off-by: Namjae Jeon -Stable-dep-of: d42334578eba ("exfat: check if filename entries exceeds max filename length") -Signed-off-by: Sasha Levin ---- - fs/exfat/balloc.c | 2 +- - fs/exfat/dir.c | 36 ++++++++++++++---------------------- - fs/exfat/exfat_fs.h | 3 +-- - fs/exfat/namei.c | 42 ++++++++++++++++-------------------------- - fs/exfat/nls.c | 2 +- - 5 files changed, 33 insertions(+), 52 deletions(-) - -diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c -index 1dce6b4e90885..e918decb37358 100644 ---- a/fs/exfat/balloc.c -+++ b/fs/exfat/balloc.c -@@ -105,7 +105,7 @@ int exfat_load_bitmap(struct super_block *sb) - struct exfat_dentry *ep; - struct buffer_head *bh; - -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - -diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c -index f6dd4fc8eaf45..8e355c6efbeb7 100644 ---- a/fs/exfat/dir.c -+++ b/fs/exfat/dir.c -@@ -68,7 +68,6 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent - { - int i, dentries_per_clu, dentries_per_clu_bits = 0, num_ext; - unsigned int type, clu_offset, max_dentries; -- sector_t sector; - struct exfat_chain dir, clu; - struct exfat_uni_name uni_name; - struct exfat_dentry *ep; -@@ -119,7 +118,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent - i = dentry & (dentries_per_clu - 1); - - for ( ; i < dentries_per_clu; i++, dentry++) { -- ep = exfat_get_dentry(sb, &clu, i, &bh, §or); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - -@@ -160,7 +159,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent - dir_entry->namebuf.lfnbuf_len); - brelse(bh); - -- ep = exfat_get_dentry(sb, &clu, i + 1, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i + 1, &bh); - if (!ep) - return -EIO; - dir_entry->size = -@@ -443,7 +442,6 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, - struct super_block *sb = inode->i_sb; - struct exfat_sb_info *sbi = EXFAT_SB(sb); - struct timespec64 ts = current_time(inode); -- sector_t sector; - struct exfat_dentry *ep; - struct buffer_head *bh; - -@@ -451,7 +449,7 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, - * We cannot use exfat_get_dentry_set here because file ep is not - * initialized yet. - */ -- ep = exfat_get_dentry(sb, p_dir, entry, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry, &bh); - if (!ep) - return -EIO; - -@@ -475,7 +473,7 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, - exfat_update_bh(bh, IS_DIRSYNC(inode)); - brelse(bh); - -- ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh); - if (!ep) - return -EIO; - -@@ -494,12 +492,11 @@ int exfat_update_dir_chksum(struct inode *inode, struct exfat_chain *p_dir, - struct super_block *sb = inode->i_sb; - int ret = 0; - int i, num_entries; -- sector_t sector; - u16 chksum; - struct exfat_dentry *ep, *fep; - struct buffer_head *fbh, *bh; - -- fep = exfat_get_dentry(sb, p_dir, entry, &fbh, §or); -+ fep = exfat_get_dentry(sb, p_dir, entry, &fbh); - if (!fep) - return -EIO; - -@@ -507,7 +504,7 @@ int exfat_update_dir_chksum(struct inode *inode, struct exfat_chain *p_dir, - chksum = exfat_calc_chksum16(fep, DENTRY_SIZE, 0, CS_DIR_ENTRY); - - for (i = 1; i < num_entries; i++) { -- ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, NULL); -+ ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); - if (!ep) { - ret = -EIO; - goto release_fbh; -@@ -529,13 +526,12 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, - { - struct super_block *sb = inode->i_sb; - int i; -- sector_t sector; - unsigned short *uniname = p_uniname->name; - struct exfat_dentry *ep; - struct buffer_head *bh; - int sync = IS_DIRSYNC(inode); - -- ep = exfat_get_dentry(sb, p_dir, entry, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry, &bh); - if (!ep) - return -EIO; - -@@ -543,7 +539,7 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, - exfat_update_bh(bh, sync); - brelse(bh); - -- ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh); - if (!ep) - return -EIO; - -@@ -553,7 +549,7 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, - brelse(bh); - - for (i = EXFAT_FIRST_CLUSTER; i < num_entries; i++) { -- ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); - if (!ep) - return -EIO; - -@@ -572,12 +568,11 @@ int exfat_remove_entries(struct inode *inode, struct exfat_chain *p_dir, - { - struct super_block *sb = inode->i_sb; - int i; -- sector_t sector; - struct exfat_dentry *ep; - struct buffer_head *bh; - - for (i = order; i < num_entries; i++) { -- ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, §or); -+ ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); - if (!ep) - return -EIO; - -@@ -715,8 +710,7 @@ static int exfat_dir_readahead(struct super_block *sb, sector_t sec) - } - - struct exfat_dentry *exfat_get_dentry(struct super_block *sb, -- struct exfat_chain *p_dir, int entry, struct buffer_head **bh, -- sector_t *sector) -+ struct exfat_chain *p_dir, int entry, struct buffer_head **bh) - { - unsigned int dentries_per_page = EXFAT_B_TO_DEN(PAGE_SIZE); - int off; -@@ -738,8 +732,6 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb, - if (!*bh) - return NULL; - -- if (sector) -- *sector = sec; - return (struct exfat_dentry *)((*bh)->b_data + off); - } - -@@ -958,7 +950,7 @@ int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei, - if (rewind && dentry == end_eidx) - goto not_found; - -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - -@@ -1144,7 +1136,7 @@ int exfat_count_ext_entries(struct super_block *sb, struct exfat_chain *p_dir, - struct buffer_head *bh; - - for (i = 0, entry++; i < ep->dentry.file.num_ext; i++, entry++) { -- ext_ep = exfat_get_dentry(sb, p_dir, entry, &bh, NULL); -+ ext_ep = exfat_get_dentry(sb, p_dir, entry, &bh); - if (!ext_ep) - return -EIO; - -@@ -1174,7 +1166,7 @@ int exfat_count_dir_entries(struct super_block *sb, struct exfat_chain *p_dir) - - while (clu.dir != EXFAT_EOF_CLUSTER) { - for (i = 0; i < dentries_per_clu; i++) { -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - entry_type = exfat_get_entry_type(ep); -diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h -index db538709dafa0..8b4253a2e0586 100644 ---- a/fs/exfat/exfat_fs.h -+++ b/fs/exfat/exfat_fs.h -@@ -470,8 +470,7 @@ int exfat_alloc_new_dir(struct inode *inode, struct exfat_chain *clu); - int exfat_find_location(struct super_block *sb, struct exfat_chain *p_dir, - int entry, sector_t *sector, int *offset); - struct exfat_dentry *exfat_get_dentry(struct super_block *sb, -- struct exfat_chain *p_dir, int entry, struct buffer_head **bh, -- sector_t *sector); -+ struct exfat_chain *p_dir, int entry, struct buffer_head **bh); - struct exfat_dentry *exfat_get_dentry_cached(struct exfat_entry_set_cache *es, - int num); - struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, -diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c -index b22d6c984f8c7..8ed7c24aae1a4 100644 ---- a/fs/exfat/namei.c -+++ b/fs/exfat/namei.c -@@ -229,7 +229,7 @@ static int exfat_search_empty_slot(struct super_block *sb, - i = dentry & (dentries_per_clu - 1); - - for (; i < dentries_per_clu; i++, dentry++) { -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - type = exfat_get_entry_type(ep); -@@ -306,7 +306,6 @@ static int exfat_find_empty_entry(struct inode *inode, - { - int dentry; - unsigned int ret, last_clu; -- sector_t sector; - loff_t size = 0; - struct exfat_chain clu; - struct exfat_dentry *ep = NULL; -@@ -379,7 +378,7 @@ static int exfat_find_empty_entry(struct inode *inode, - struct buffer_head *bh; - - ep = exfat_get_dentry(sb, -- &(ei->dir), ei->entry + 1, &bh, §or); -+ &(ei->dir), ei->entry + 1, &bh); - if (!ep) - return -EIO; - -@@ -779,7 +778,6 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) - struct inode *inode = dentry->d_inode; - struct exfat_inode_info *ei = EXFAT_I(inode); - struct buffer_head *bh; -- sector_t sector; - int num_entries, entry, err = 0; - - mutex_lock(&EXFAT_SB(sb)->s_lock); -@@ -791,7 +789,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) - goto unlock; - } - -- ep = exfat_get_dentry(sb, &cdir, entry, &bh, §or); -+ ep = exfat_get_dentry(sb, &cdir, entry, &bh); - if (!ep) { - err = -EIO; - goto unlock; -@@ -895,7 +893,7 @@ static int exfat_check_dir_empty(struct super_block *sb, - - while (clu.dir != EXFAT_EOF_CLUSTER) { - for (i = 0; i < dentries_per_clu; i++) { -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - type = exfat_get_entry_type(ep); -@@ -932,7 +930,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) - struct exfat_sb_info *sbi = EXFAT_SB(sb); - struct exfat_inode_info *ei = EXFAT_I(inode); - struct buffer_head *bh; -- sector_t sector; - int num_entries, entry, err; - - mutex_lock(&EXFAT_SB(inode->i_sb)->s_lock); -@@ -957,7 +954,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) - goto unlock; - } - -- ep = exfat_get_dentry(sb, &cdir, entry, &bh, §or); -+ ep = exfat_get_dentry(sb, &cdir, entry, &bh); - if (!ep) { - err = -EIO; - goto unlock; -@@ -1005,13 +1002,12 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, - struct exfat_inode_info *ei) - { - int ret, num_old_entries, num_new_entries; -- sector_t sector_old, sector_new; - struct exfat_dentry *epold, *epnew; - struct super_block *sb = inode->i_sb; - struct buffer_head *new_bh, *old_bh; - int sync = IS_DIRSYNC(inode); - -- epold = exfat_get_dentry(sb, p_dir, oldentry, &old_bh, §or_old); -+ epold = exfat_get_dentry(sb, p_dir, oldentry, &old_bh); - if (!epold) - return -EIO; - -@@ -1032,8 +1028,7 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, - if (newentry < 0) - return newentry; /* -EIO or -ENOSPC */ - -- epnew = exfat_get_dentry(sb, p_dir, newentry, &new_bh, -- §or_new); -+ epnew = exfat_get_dentry(sb, p_dir, newentry, &new_bh); - if (!epnew) - return -EIO; - -@@ -1046,12 +1041,10 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, - brelse(old_bh); - brelse(new_bh); - -- epold = exfat_get_dentry(sb, p_dir, oldentry + 1, &old_bh, -- §or_old); -+ epold = exfat_get_dentry(sb, p_dir, oldentry + 1, &old_bh); - if (!epold) - return -EIO; -- epnew = exfat_get_dentry(sb, p_dir, newentry + 1, &new_bh, -- §or_new); -+ epnew = exfat_get_dentry(sb, p_dir, newentry + 1, &new_bh); - if (!epnew) { - brelse(old_bh); - return -EIO; -@@ -1094,12 +1087,11 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, - struct exfat_uni_name *p_uniname, struct exfat_inode_info *ei) - { - int ret, newentry, num_new_entries, num_old_entries; -- sector_t sector_mov, sector_new; - struct exfat_dentry *epmov, *epnew; - struct super_block *sb = inode->i_sb; - struct buffer_head *mov_bh, *new_bh; - -- epmov = exfat_get_dentry(sb, p_olddir, oldentry, &mov_bh, §or_mov); -+ epmov = exfat_get_dentry(sb, p_olddir, oldentry, &mov_bh); - if (!epmov) - return -EIO; - -@@ -1117,7 +1109,7 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, - if (newentry < 0) - return newentry; /* -EIO or -ENOSPC */ - -- epnew = exfat_get_dentry(sb, p_newdir, newentry, &new_bh, §or_new); -+ epnew = exfat_get_dentry(sb, p_newdir, newentry, &new_bh); - if (!epnew) - return -EIO; - -@@ -1130,12 +1122,10 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, - brelse(mov_bh); - brelse(new_bh); - -- epmov = exfat_get_dentry(sb, p_olddir, oldentry + 1, &mov_bh, -- §or_mov); -+ epmov = exfat_get_dentry(sb, p_olddir, oldentry + 1, &mov_bh); - if (!epmov) - return -EIO; -- epnew = exfat_get_dentry(sb, p_newdir, newentry + 1, &new_bh, -- §or_new); -+ epnew = exfat_get_dentry(sb, p_newdir, newentry + 1, &new_bh); - if (!epnew) { - brelse(mov_bh); - return -EIO; -@@ -1195,7 +1185,7 @@ static int __exfat_rename(struct inode *old_parent_inode, - EXFAT_I(old_parent_inode)->flags); - dentry = ei->entry; - -- ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh, NULL); -+ ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh); - if (!ep) { - ret = -EIO; - goto out; -@@ -1214,7 +1204,7 @@ static int __exfat_rename(struct inode *old_parent_inode, - - p_dir = &(new_ei->dir); - new_entry = new_ei->entry; -- ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh, NULL); -+ ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh); - if (!ep) - goto out; - -@@ -1254,7 +1244,7 @@ static int __exfat_rename(struct inode *old_parent_inode, - - if (!ret && new_inode) { - /* delete entries of new_dir */ -- ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh, NULL); -+ ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh); - if (!ep) { - ret = -EIO; - goto del_out; -diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c -index 314d5407a1be5..ef115e673406f 100644 ---- a/fs/exfat/nls.c -+++ b/fs/exfat/nls.c -@@ -761,7 +761,7 @@ int exfat_create_upcase_table(struct super_block *sb) - - while (clu.dir != EXFAT_EOF_CLUSTER) { - for (i = 0; i < sbi->dentries_per_clu; i++) { -- ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); -+ ep = exfat_get_dentry(sb, &clu, i, &bh); - if (!ep) - return -EIO; - --- -2.40.1 - diff --git a/queue-5.15/exfat-support-dynamic-allocate-bh-for-exfat_entry_se.patch b/queue-5.15/exfat-support-dynamic-allocate-bh-for-exfat_entry_se.patch deleted file mode 100644 index 6442301acfe..00000000000 --- a/queue-5.15/exfat-support-dynamic-allocate-bh-for-exfat_entry_se.patch +++ /dev/null @@ -1,91 +0,0 @@ -From bc71b2ede225e52d70c9b809b631aaf4fef463f2 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 9 Nov 2022 13:50:22 +0800 -Subject: exfat: support dynamic allocate bh for exfat_entry_set_cache - -From: Yuezhang Mo - -[ Upstream commit a3ff29a95fde16906304455aa8c0bd84eb770258 ] - -In special cases, a file or a directory may occupied more than 19 -directory entries, pre-allocating 3 bh is not enough. Such as - - Support vendor secondary directory entry in the future. - - Since file directory entry is damaged, the SecondaryCount - field is bigger than 18. - -So this commit supports dynamic allocation of bh. - -Signed-off-by: Yuezhang Mo -Reviewed-by: Andy Wu -Reviewed-by: Aoyama Wataru -Reviewed-by: Sungjong Seo -Signed-off-by: Namjae Jeon -Stable-dep-of: d42334578eba ("exfat: check if filename entries exceeds max filename length") -Signed-off-by: Sasha Levin ---- - fs/exfat/dir.c | 15 +++++++++++++++ - fs/exfat/exfat_fs.h | 5 ++++- - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c -index 8e355c6efbeb7..0c51bc986b7a6 100644 ---- a/fs/exfat/dir.c -+++ b/fs/exfat/dir.c -@@ -613,6 +613,10 @@ int exfat_free_dentry_set(struct exfat_entry_set_cache *es, int sync) - bforget(es->bh[i]); - else - brelse(es->bh[i]); -+ -+ if (IS_DYNAMIC_ES(es)) -+ kfree(es->bh); -+ - kfree(es); - return err; - } -@@ -845,6 +849,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, - /* byte offset in sector */ - off = EXFAT_BLK_OFFSET(byte_offset, sb); - es->start_off = off; -+ es->bh = es->__bh; - - /* sector offset in cluster */ - sec = EXFAT_B_TO_BLK(byte_offset, sb); -@@ -864,6 +869,16 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, - es->num_entries = num_entries; - - num_bh = EXFAT_B_TO_BLK_ROUND_UP(off + num_entries * DENTRY_SIZE, sb); -+ if (num_bh > ARRAY_SIZE(es->__bh)) { -+ es->bh = kmalloc_array(num_bh, sizeof(*es->bh), GFP_KERNEL); -+ if (!es->bh) { -+ brelse(bh); -+ kfree(es); -+ return NULL; -+ } -+ es->bh[0] = bh; -+ } -+ - for (i = 1; i < num_bh; i++) { - /* get the next sector */ - if (exfat_is_last_sector_in_cluster(sbi, sec)) { -diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h -index 8b4253a2e0586..efa7f116a835f 100644 ---- a/fs/exfat/exfat_fs.h -+++ b/fs/exfat/exfat_fs.h -@@ -170,10 +170,13 @@ struct exfat_entry_set_cache { - bool modified; - unsigned int start_off; - int num_bh; -- struct buffer_head *bh[DIR_CACHE_SIZE]; -+ struct buffer_head *__bh[DIR_CACHE_SIZE]; -+ struct buffer_head **bh; - unsigned int num_entries; - }; - -+#define IS_DYNAMIC_ES(es) ((es)->__bh != (es)->bh) -+ - struct exfat_dir_entry { - struct exfat_chain dir; - int entry; --- -2.40.1 - diff --git a/queue-5.15/series b/queue-5.15/series index e7c0266b929..d814f5e13fe 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -18,8 +18,6 @@ alsa-pcm-fix-potential-data-race-at-pcm-memory-alloc.patch jbd2-remove-t_checkpoint_io_list.patch jbd2-remove-journal_clean_one_cp_list.patch jbd2-fix-a-race-when-checking-checkpoint-buffer-busy.patch -exfat-remove-argument-sector-from-exfat_get_dentry.patch -exfat-support-dynamic-allocate-bh-for-exfat_entry_se.patch can-raw-fix-receiver-memory-leak.patch drm-amd-display-do-not-wait-for-mpc-idle-if-tg-is-di.patch drm-amd-display-check-tg-is-non-null-before-checking.patch