android_kernel_google_msm/fs/btrfs
Eric Sandeen e18bac2cae 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:01:33 -07:00
..
acl.c
async-thread.c
async-thread.h
backref.c Btrfs: use right type to get real comparison 2014-06-30 20:01:33 -07:00
backref.h
btrfs_inode.h
check-integrity.c
check-integrity.h
compat.h
compression.c Btrfs: fix data corruption when reading/updating compressed extents 2014-03-23 21:37:08 -07:00
compression.h
ctree.c
ctree.h
delayed-inode.c
delayed-inode.h
delayed-ref.c
delayed-ref.h
dir-item.c
disk-io.c
disk-io.h
export.c
export.h
extent-tree.c Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() 2014-02-06 11:05:48 -08:00
extent_io.c btrfs: fix use of uninit "ret" in end_extent_writepage() 2014-06-30 20:01:33 -07:00
extent_io.h Btrfs: fix race between mmap writes and compression 2013-04-05 10:04:34 -07:00
extent_map.c
extent_map.h
file-item.c
file.c
free-space-cache.c
free-space-cache.h
hash.h
inode-item.c
inode-map.c
inode-map.h
inode.c Btrfs: fix race between mmap writes and compression 2013-04-05 10:04:34 -07:00
ioctl.c btrfs: don't stop searching after encountering the wrong item 2013-05-24 11:14:22 -07:00
ioctl.h
Kconfig
locking.c
locking.h
lzo.c
Makefile
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
reada.c
relocation.c Btrfs: change how we queue blocks for backref checking 2013-10-13 15:42:50 -07:00
root-tree.c
scrub.c Btrfs: don't drop path when printing out tree errors in scrub 2013-04-05 10:04:34 -07:00
struct-funcs.c
super.c
sysfs.c
transaction.c
transaction.h
tree-defrag.c
tree-log.c Btrfs: make sure nbytes are right after log replay 2013-04-25 21:19:56 -07:00
tree-log.h
ulist.c
ulist.h
version.h
volumes.c fs: btrfs: volumes.c: Fix for possible null pointer dereference 2014-06-30 20:01:33 -07:00
volumes.h
xattr.c
xattr.h
zlib.c