Eric Sandeen
26401cbceb
btrfs: fix use of uninit "ret" in end_extent_writepage()
...
commit 3e2426bd0e 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 >
2014-06-30 20:09:46 -07:00
..
2013-12-20 07:45:12 -08:00
2012-07-25 16:15:07 -04:00
2012-03-22 01:45:34 +01:00
2014-06-30 20:09:46 -07:00
2014-06-30 20:09:46 -07:00
2013-05-06 15:54:49 -04:00
2013-05-17 21:52:52 -04:00
2011-12-21 19:14:09 +01:00
2009-01-06 09:38:55 -05:00
2014-03-23 21:38:20 -07:00
2013-05-06 15:55:23 -04:00
2013-07-21 18:21:32 -07:00
2013-05-17 21:40:15 -04:00
2013-05-06 15:55:23 -04:00
2013-03-07 07:52:40 -05:00
2013-05-06 15:55:17 -04:00
2013-05-17 21:40:15 -04:00
2013-05-17 21:40:16 -04:00
2012-12-12 17:15:41 -05:00
2013-05-06 15:55:23 -04:00
2014-06-30 20:09:46 -07:00
2013-05-06 15:55:23 -04:00
2013-02-26 02:46:10 -05:00
2008-09-25 11:04:06 -04:00
2014-06-30 20:09:46 -07:00
2013-05-17 21:52:52 -04:00
2013-05-06 15:55:23 -04:00
2013-05-06 15:54:34 -04:00
2014-02-06 11:08:18 -08:00
2013-05-06 15:55:23 -04:00
2013-05-09 13:07:40 -07:00
2014-06-30 20:09:45 -07:00
2013-05-17 21:40:22 -04:00
2012-10-09 09:14:45 -04:00
2013-05-06 15:55:23 -04:00
2013-05-17 21:40:22 -04:00
2011-04-25 16:46:11 +08:00
2014-03-06 21:30:06 -08:00
2014-02-06 11:08:18 -08:00
2013-05-06 15:55:16 -04:00
2013-05-06 15:55:23 -04:00
2013-03-14 14:57:10 -04:00
2012-03-20 21:48:21 +08:00
2013-02-01 14:24:23 -05:00
2012-12-11 13:31:30 -05:00
2013-05-06 15:54:35 -04:00
2013-05-06 15:54:35 -04:00
2012-03-22 11:52:54 +01:00
2013-05-06 15:54:23 -04:00
2013-05-06 15:55:23 -04:00
2013-05-06 15:55:20 -04:00
2013-05-17 21:52:52 -04:00
2013-02-01 14:24:23 -05:00
2012-06-14 21:29:16 -04:00
2013-05-06 15:54:55 -04:00
2013-10-13 16:08:34 -07:00
2013-05-06 15:55:14 -04:00
2014-06-30 20:09:46 -07:00
2014-06-30 20:09:46 -07:00
2013-05-06 15:55:23 -04:00
2012-07-23 16:28:06 -04:00
2013-05-17 21:40:31 -04:00
2013-03-01 15:01:01 -05:00
2013-05-06 15:55:23 -04:00
2013-05-06 15:55:23 -04:00
2013-02-20 12:59:36 -05:00
2013-12-20 07:45:12 -08:00
2013-05-06 15:55:23 -04:00
2013-08-11 18:35:24 -07:00
2013-05-06 15:54:44 -04:00
2008-09-25 15:41:59 -04:00
2014-06-30 20:09:46 -07:00
2013-05-17 21:52:52 -04:00
2013-05-06 15:55:23 -04:00
2011-02-01 11:12:29 -05:00
2012-10-09 09:19:57 -04:00