[PATCH] Cherry picked from commit e3b49ea36802053f312013fd4ccb6e59920a9f76 [Please apply to 5.10-stable and 5.15-stable.]