https://github.com/torvalds/linux
Revision 3ad216ee73abc554ed8f13f4f8b70845a7bef6da authored by David Howells on 14 November 2020, 17:27:57 UTC, committed by Linus Torvalds on 14 November 2020, 19:51:18 UTC
When afs_write_end() is called with copied == 0, it tries to set the
dirty region, but there's no way to actually encode a 0-length region in
the encoding in page->private.

"0,0", for example, indicates a 1-byte region at offset 0.  The maths
miscalculates this and sets it incorrectly.

Fix it to just do nothing but unlock and put the page in this case.  We
don't actually need to mark the page dirty as nothing presumably
changed.

Fixes: 65dd2d6072d3 ("afs: Alter dirty range encoding in page->private")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f01c30d
History
Tip revision: 3ad216ee73abc554ed8f13f4f8b70845a7bef6da authored by David Howells on 14 November 2020, 17:27:57 UTC
afs: Fix afs_write_end() when called with copied == 0 [ver #3]
Tip revision: 3ad216e
File Mode Size
altera-stapl
c2port
cardreader
cb710
cxl
echo
eeprom
genwqe
habanalabs
ibmasm
lis3lv02d
lkdtm
mei
ocxl
sgi-gru
sgi-xp
ti-st
uacce
vmw_vmci
Kconfig -rw-r--r-- 16.3 KB
Makefile -rw-r--r-- 2.1 KB
ad525x_dpot-i2c.c -rw-r--r-- 2.6 KB
ad525x_dpot-spi.c -rw-r--r-- 2.8 KB
ad525x_dpot.c -rw-r--r-- 20.1 KB
ad525x_dpot.h -rw-r--r-- 7.9 KB
apds9802als.c -rw-r--r-- 7.0 KB
apds990x.c -rw-r--r-- 33.2 KB
atmel-ssc.c -rw-r--r-- 5.9 KB
atmel_tclib.c -rw-r--r-- 4.6 KB
bh1770glc.c -rw-r--r-- 36.8 KB
cs5535-mfgpt.c -rw-r--r-- 10.0 KB
ds1682.c -rw-r--r-- 7.0 KB
dummy-irq.c -rw-r--r-- 1.4 KB
enclosure.c -rw-r--r-- 18.3 KB
fastrpc.c -rw-r--r-- 39.6 KB
hisi_hikey_usb.c -rw-r--r-- 7.1 KB
hmc6352.c -rw-r--r-- 3.4 KB
hpilo.c -rw-r--r-- 21.9 KB
hpilo.h -rw-r--r-- 5.5 KB
ibmvmc.c -rw-r--r-- 60.8 KB
ibmvmc.h -rw-r--r-- 5.2 KB
ics932s401.c -rw-r--r-- 12.6 KB
isl29003.c -rw-r--r-- 10.9 KB
isl29020.c -rw-r--r-- 5.0 KB
kgdbts.c -rw-r--r-- 30.3 KB
lattice-ecp3-config.c -rw-r--r-- 5.6 KB
pch_phub.c -rw-r--r-- 27.0 KB
pci_endpoint_test.c -rw-r--r-- 23.9 KB
phantom.c -rw-r--r-- 13.0 KB
pti.c -rw-r--r-- 26.0 KB
pvpanic.c -rw-r--r-- 3.9 KB
qcom-coincell.c -rw-r--r-- 3.6 KB
sram-exec.c -rw-r--r-- 3.8 KB
sram.c -rw-r--r-- 10.0 KB
sram.h -rw-r--r-- 1.0 KB
tifm_7xx1.c -rw-r--r-- 10.7 KB
tifm_core.c -rw-r--r-- 8.1 KB
tsl2550.c -rw-r--r-- 10.0 KB
vmw_balloon.c -rw-r--r-- 54.7 KB
xilinx_sdfec.c -rw-r--r-- 38.5 KB

back to top