From: Sasha Levin Date: Sun, 19 Jun 2022 13:03:29 +0000 (-0400) Subject: Fixes for 4.9 X-Git-Tag: v5.4.200~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16c8252166261ef7c53557b7ce9022d1f472a571;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.9 Signed-off-by: Sasha Levin --- diff --git a/queue-4.9/misc-atmel-ssc-fix-irq-check-in-ssc_probe.patch b/queue-4.9/misc-atmel-ssc-fix-irq-check-in-ssc_probe.patch new file mode 100644 index 00000000000..e9415e7b7cd --- /dev/null +++ b/queue-4.9/misc-atmel-ssc-fix-irq-check-in-ssc_probe.patch @@ -0,0 +1,47 @@ +From b8f8128900dbc2c45f61f2c02c55d294d06ae37f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 1 Jun 2022 16:30:26 +0400 +Subject: misc: atmel-ssc: Fix IRQ check in ssc_probe + +From: Miaoqian Lin + +[ Upstream commit 1c245358ce0b13669f6d1625f7a4e05c41f28980 ] + +platform_get_irq() returns negative error number instead 0 on failure. +And the doc of platform_get_irq() provides a usage example: + + int irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + +Fix the check of return value to catch errors correctly. + +Fixes: eb1f2930609b ("Driver for the Atmel on-chip SSC on AT32AP and AT91") +Reviewed-by: Claudiu Beznea +Signed-off-by: Miaoqian Lin +Link: https://lore.kernel.org/r/20220601123026.7119-1-linmq006@gmail.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/misc/atmel-ssc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c +index 8c9a444d61d3..65bc573d6ab4 100644 +--- a/drivers/misc/atmel-ssc.c ++++ b/drivers/misc/atmel-ssc.c +@@ -190,9 +190,9 @@ static int ssc_probe(struct platform_device *pdev) + clk_disable_unprepare(ssc->clk); + + ssc->irq = platform_get_irq(pdev, 0); +- if (!ssc->irq) { ++ if (ssc->irq < 0) { + dev_dbg(&pdev->dev, "could not get irq\n"); +- return -ENXIO; ++ return ssc->irq; + } + + mutex_lock(&user_lock); +-- +2.35.1 + diff --git a/queue-4.9/pnfs-don-t-keep-retrying-if-the-server-replied-nfs4e.patch b/queue-4.9/pnfs-don-t-keep-retrying-if-the-server-replied-nfs4e.patch new file mode 100644 index 00000000000..c48548bc202 --- /dev/null +++ b/queue-4.9/pnfs-don-t-keep-retrying-if-the-server-replied-nfs4e.patch @@ -0,0 +1,42 @@ +From f4d674abb45e7b90a919867145f678fcb55ad2dd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 31 May 2022 11:03:06 -0400 +Subject: pNFS: Don't keep retrying if the server replied + NFS4ERR_LAYOUTUNAVAILABLE + +From: Trond Myklebust + +[ Upstream commit fe44fb23d6ccde4c914c44ef74ab8d9d9ba02bea ] + +If the server tells us that a pNFS layout is not available for a +specific file, then we should not keep pounding it with further +layoutget requests. + +Fixes: 183d9e7b112a ("pnfs: rework LAYOUTGET retry handling") +Signed-off-by: Trond Myklebust +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/pnfs.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c +index f19cded49b29..317d22f84492 100644 +--- a/fs/nfs/pnfs.c ++++ b/fs/nfs/pnfs.c +@@ -1753,6 +1753,12 @@ pnfs_update_layout(struct inode *ino, + /* Fallthrough */ + case -EAGAIN: + break; ++ case -ENODATA: ++ /* The server returned NFS4ERR_LAYOUTUNAVAILABLE */ ++ pnfs_layout_set_fail_bit( ++ lo, pnfs_iomode_to_fail_bit(iomode)); ++ lseg = NULL; ++ goto out_put_layout_hdr; + default: + if (!nfs_error_is_fatal(PTR_ERR(lseg))) { + pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); +-- +2.35.1 + diff --git a/queue-4.9/series b/queue-4.9/series index 0f7ba62033b..12f78febc00 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -235,3 +235,5 @@ nfc-nfcmrvl-fix-memory-leak-in-nfcmrvl_play_deferred.patch ipv6-fix-signed-integer-overflow-in-l2tp_ip6_sendmsg.patch net-ethernet-mtk_eth_soc-fix-misuse-of-mem-alloc-int.patch random-credit-cpu-and-bootloader-seeds-by-default.patch +pnfs-don-t-keep-retrying-if-the-server-replied-nfs4e.patch +misc-atmel-ssc-fix-irq-check-in-ssc_probe.patch