projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37b3f3b
)
Also check the return value of kmalloc in case of memory starvation.
author
Michael Grigoriev
<mag@luminal.org>
Sun, 9 Nov 2003 16:16:36 +0000
(16:16 +0000)
committer
Michael Grigoriev
<mag@luminal.org>
Sun, 9 Nov 2003 16:16:36 +0000
(16:16 +0000)
kernel/file.c
patch
|
blob
|
history
diff --git
a/kernel/file.c
b/kernel/file.c
index 3e9b80b1070de6606dbff71ab6ff6d5804ebd514..41689412f4f0af9259a07ab9e0d3fb977f384161 100644
(file)
--- a/
kernel/file.c
+++ b/
kernel/file.c
@@
-225,9
+225,13
@@
static ssize_t fuse_file_read(struct file *filp, char *buf,
bl_end_index = bl_file_end_index;
while (bl_index <= bl_end_index) {
+ int res;
char *bl_buf = kmalloc(FUSE_BLOCK_SIZE, GFP_NOFS);
- int res = fuse_is_block_uptodate(mapping, inode, bl_index);
+ if (!bl_buf)
+ break;
+
+ res = fuse_is_block_uptodate(mapping, inode, bl_index);
if (!res)
res = fuse_file_read_block(inode, bl_buf, bl_index);