summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-11-12 11:46:23 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2015-11-16 20:38:43 -0500
commitcf89752645e47d86ba8a4157f4b121fcb33434c5 (patch)
tree98d2458686405879ec6206dba3e9f2c5c33b43e4
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadtalos-op-linux-cf89752645e47d86ba8a4157f4b121fcb33434c5.tar.gz
talos-op-linux-cf89752645e47d86ba8a4157f4b121fcb33434c5.zip
FS-Cache: Add missing initialization of ret in cachefiles_write_page()
fs/cachefiles/rdwr.c: In function ‘cachefiles_write_page’: fs/cachefiles/rdwr.c:882: warning: ‘ret’ may be used uninitialized in this function If the jump to label "error" is taken, "ret" will indeed be uninitialized, and random stack data may be printed by the debug code. Fixes: 102f4d900c9c8f5e ("FS-Cache: Handle a write to the page immediately beyond the EOF marker") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/cachefiles/rdwr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 7a6b02f72787..c0f3da3926a0 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -879,7 +879,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
loff_t pos, eof;
size_t len;
void *data;
- int ret;
+ int ret = -ENOBUFS;
ASSERT(op != NULL);
ASSERT(page != NULL);
OpenPOWER on IntegriCloud