kernel: bump 5.4 to 5.4.284

This commit is contained in:
coolsnowwolf 2024-10-01 14:11:04 +08:00
parent d1ebc2ca7d
commit b99d532315
10 changed files with 43 additions and 23 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .278
LINUX_KERNEL_HASH-5.4.278 = e5a00606115545f444ef2766af5652f5539e3c96f46a9778bede89b98ffb8588
LINUX_VERSION-5.4 = .284
LINUX_KERNEL_HASH-5.4.284 = 77221ab9aebeac746915c755ec3b7d320f85cd219c63d9c501820fbca1e3b32b

View File

@ -116,10 +116,10 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -581,6 +581,7 @@ void br_fdb_update(struct net_bridge *br
@@ -589,6 +589,7 @@
/* fastpath: update of existing entry */
if (unlikely(source != fdb->dst && !fdb->is_sticky)) {
if (unlikely(source != fdb->dst &&
!test_bit(BR_FDB_STICKY, &fdb->flags))) {
+ br_switchdev_fdb_notify(fdb, RTM_DELNEIGH);
fdb->dst = source;
fdb_modified = true;

View File

@ -0,0 +1,16 @@
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -193,7 +193,12 @@
struct net_bridge_fdb_key key;
struct hlist_node fdb_node;
unsigned long flags;
- unsigned char offloaded:1;
+ unsigned char is_local:1,
+ is_static:1,
+ is_sticky:1,
+ added_by_user:1,
+ added_by_external_learn:1,
+ offloaded:1;
/* write-heavy members should not affect lookups */
unsigned long updated ____cacheline_aligned_in_smp;

View File

@ -661,7 +661,7 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits)
wnd->total_zeroes = nbits;
wnd->extent_max = MINUS_ONE_T;
wnd->zone_bit = wnd->zone_end = 0;
wnd->nwnd = bytes_to_block(sb, bitmap_size(nbits));
wnd->nwnd = bytes_to_block(sb, ntfs3_bitmap_size(nbits));
wnd->bits_last = nbits & (wbits - 1);
if (!wnd->bits_last)
wnd->bits_last = wbits;
@ -1323,7 +1323,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits)
return -EINVAL;
/* Align to 8 byte boundary. */
new_wnd = bytes_to_block(sb, bitmap_size(new_bits));
new_wnd = bytes_to_block(sb, ntfs3_bitmap_size(new_bits));
new_last = new_bits & (wbits - 1);
if (!new_last)
new_last = wbits;

View File

@ -493,7 +493,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi)
ni->mi.dirty = true;
/* Step 2: Resize $MFT::BITMAP. */
new_bitmap_bytes = bitmap_size(new_mft_total);
new_bitmap_bytes = ntfs3_bitmap_size(new_mft_total);
err = attr_set_size(ni, ATTR_BITMAP, NULL, 0, &sbi->mft.bitmap.run,
new_bitmap_bytes, &new_bitmap_bytes, true, NULL);

View File

@ -1360,8 +1360,8 @@ static int indx_create_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
alloc->nres.valid_size = alloc->nres.data_size = cpu_to_le64(data_size);
err = ni_insert_resident(ni, bitmap_size(1), ATTR_BITMAP, in->name,
in->name_len, &bitmap, NULL, NULL);
err = ni_insert_resident(ni, ntfs3_bitmap_size(1), ATTR_BITMAP,
in->name, in->name_len, &bitmap, NULL, NULL);
if (err)
goto out2;
@ -1422,8 +1422,9 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
if (bmp) {
/* Increase bitmap. */
err = attr_set_size(ni, ATTR_BITMAP, in->name, in->name_len,
&indx->bitmap_run, bitmap_size(bit + 1),
NULL, true, NULL);
&indx->bitmap_run,
ntfs3_bitmap_size(bit + 1), NULL, true,
NULL);
if (err)
goto out1;
}
@ -1980,7 +1981,7 @@ static int indx_shrink(struct ntfs_index *indx, struct ntfs_inode *ni,
if (err)
return err;
bpb = bitmap_size(bit);
bpb = ntfs3_bitmap_size(bit);
if (bpb * 8 == nbits)
return 0;

View File

@ -38,6 +38,7 @@ struct page;
struct writeback_control;
enum utf16_endian;
#define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u64))
#define MINUS_ONE_T ((size_t)(-1))
/* Biggest MFT / smallest cluster */
@ -943,9 +944,9 @@ static inline bool run_is_empty(struct runs_tree *run)
}
/* NTFS uses quad aligned bitmaps. */
static inline size_t bitmap_size(size_t bits)
static inline size_t ntfs3_bitmap_size(size_t bits)
{
return ALIGN((bits + 7) >> 3, 8);
return BITS_TO_U64(bits) * sizeof(u64);
}
#define _100ns2seconds 10000000

View File

@ -1100,7 +1100,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
/* Check bitmap boundary. */
tt = sbi->used.bitmap.nbits;
if (inode->i_size < bitmap_size(tt)) {
if (inode->i_size < ntfs3_bitmap_size(tt)) {
err = -EINVAL;
goto put_inode_out;
}

View File

@ -15,7 +15,7 @@ Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
--- a/net/bridge/br_switchdev.c
+++ b/net/bridge/br_switchdev.c
@@ -102,42 +102,27 @@ int br_switchdev_set_port_flag(struct ne
@@ -102,44 +102,27 @@
return 0;
}
@ -53,7 +53,8 @@ Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
- br_switchdev_fdb_call_notifiers(false, fdb->key.addr.addr,
- fdb->key.vlan_id,
- fdb->dst->dev,
- fdb->added_by_user,
- test_bit(BR_FDB_ADDED_BY_USER,
- &fdb->flags),
- fdb->offloaded);
+ call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_DEVICE,
+ fdb->dst->dev, &info.info, NULL);
@ -62,7 +63,8 @@ Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
- br_switchdev_fdb_call_notifiers(true, fdb->key.addr.addr,
- fdb->key.vlan_id,
- fdb->dst->dev,
- fdb->added_by_user,
- test_bit(BR_FDB_ADDED_BY_USER,
- &fdb->flags),
- fdb->offloaded);
+ call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_DEVICE,
+ fdb->dst->dev, &info.info, NULL);

View File

@ -17,16 +17,16 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -581,7 +581,7 @@ void br_fdb_update(struct net_bridge *br
@@ -589,7 +589,7 @@
/* fastpath: update of existing entry */
if (unlikely(source != fdb->dst && !fdb->is_sticky)) {
if (unlikely(source != fdb->dst &&
!test_bit(BR_FDB_STICKY, &fdb->flags))) {
- br_switchdev_fdb_notify(fdb, RTM_DELNEIGH);
+ br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH);
fdb->dst = source;
fdb_modified = true;
/* Take over HW learned entry */
@@ -697,7 +697,7 @@ static void fdb_notify(struct net_bridge
@@ -705,7 +705,7 @@
int err = -ENOBUFS;
if (swdev_notify)