aboutsummaryrefslogtreecommitdiff
path: root/fs/cramfs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-06-12 00:39:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-30 20:12:02 -0700
commitfe79ac25b6727012ca89de85b8008e1e07db4978 (patch)
tree5af4726f3acf35a84a73a056daef4e6e888722ac /fs/cramfs
parent75f93474507a99f8be8000cb0f33a60d488298d4 (diff)
btrfs: fix use of uninit "ret" in end_extent_writepage()
commit 3e2426bd0eb980648449e7a2f5a23e3cd3c7725c upstream. If this condition in end_extent_writepage() is false: if (tree->ops && tree->ops->writepage_end_io_hook) we will then test an uninitialized "ret" at: ret = ret < 0 ? ret : -EIO; The test for ret is for the case where ->writepage_end_io_hook failed, and we'd choose that ret as the error; but if there is no ->writepage_end_io_hook, nothing sets ret. Initializing ret to 0 should be sufficient; if writepage_end_io_hook wasn't set, (!uptodate) means non-zero err was passed in, so we choose -EIO in that case. Signed-of-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cramfs')
0 files changed, 0 insertions, 0 deletions