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
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.3 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.8 KB
.mailmap -rw-r--r-- 17.4 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 97.8 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 562.4 KB
Makefile -rw-r--r-- 62.7 KB
README -rw-r--r-- 727 bytes

README

back to top