git://git.openafs.org
/
openafs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
LINUX: Detect NULL page during write_begin
[openafs.git]
/
src
/
afs
/
LINUX
/
osi_vnodeops.c
diff --git
a/src/afs/LINUX/osi_vnodeops.c
b/src/afs/LINUX/osi_vnodeops.c
index
9a070f2
..
966e98a
100644
(file)
--- a/
src/afs/LINUX/osi_vnodeops.c
+++ b/
src/afs/LINUX/osi_vnodeops.c
@@
-3082,6
+3082,10
@@
afs_linux_write_begin(struct file *file, struct address_space *mapping,
int code;
page = grab_cache_page_write_begin(mapping, index, flags);
+ if (!page) {
+ return -ENOMEM;
+ }
+
*pagep = page;
code = afs_linux_prepare_write(file, page, from, from + len);