android_kernel_samsung_msm8976/fs/btrfs
Eric Sandeen 26401cbceb 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>
2014-06-30 20:09:46 -07:00
..
acl.c Btrfs: fix incorrect inode acl reset 2013-12-20 07:45:12 -08:00
async-thread.c
async-thread.h
backref.c Btrfs: fix scrub_print_warning to handle skinny metadata extents 2014-06-30 20:09:46 -07:00
backref.h Btrfs: fix scrub_print_warning to handle skinny metadata extents 2014-06-30 20:09:46 -07:00
btrfs_inode.h
check-integrity.c Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
check-integrity.h
compat.h
compression.c Btrfs: fix data corruption when reading/updating compressed extents 2014-03-23 21:38:20 -07:00
compression.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
ctree.c Btrfs: only do the tree_mod_log_free_eb if this is our last ref 2013-07-21 18:21:32 -07:00
ctree.h Btrfs: handle running extent ops with skinny metadata 2013-05-17 21:40:15 -04:00
delayed-inode.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
delayed-inode.h
delayed-ref.c Btrfs: separate sequence numbers for delayed ref tracking and tree mod log 2013-05-06 15:55:17 -04:00
delayed-ref.h Btrfs: handle running extent ops with skinny metadata 2013-05-17 21:40:15 -04:00
dev-replace.c Btrfs: don't allow device replace on RAID5/RAID6 2013-05-17 21:40:16 -04:00
dev-replace.h
dir-item.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
disk-io.c Btrfs: make sure there are not any read requests before stopping workers 2014-06-30 20:09:46 -07:00
disk-io.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
export.c
export.h
extent-tree.c Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() 2014-02-06 11:08:18 -08:00
extent_io.c btrfs: fix use of uninit "ret" in end_extent_writepage() 2014-06-30 20:09:46 -07:00
extent_io.h Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
extent_map.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
extent_map.h
file-item.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-05-09 13:07:40 -07:00
free-space-cache.c Btrfs: output warning instead of error when loading free space cache failed 2014-06-30 20:09:45 -07:00
free-space-cache.h Btrfs: don't use global block reservation for inode cache truncation 2013-05-17 21:40:22 -04:00
hash.h
inode-item.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
inode-map.c Btrfs: don't use global block reservation for inode cache truncation 2013-05-17 21:40:22 -04:00
inode-map.h
inode.c fs: fix iversion handling 2014-03-06 21:30:06 -08:00
ioctl.c btrfs: restrict snapshotting to own subvolumes 2014-02-06 11:08:18 -08:00
Kconfig btrfs: move leak debug code to functions 2013-05-06 15:55:16 -04:00
locking.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
locking.h
lzo.c
Makefile
math.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
qgroup.c Btrfs: automatic rescan after "quota enable" command 2013-05-06 15:55:20 -04:00
raid56.c Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
raid56.h
rcu-string.h
reada.c Btrfs: fix reada debug code compilation 2013-05-06 15:54:55 -04:00
relocation.c Btrfs: change how we queue blocks for backref checking 2013-10-13 16:08:34 -07:00
root-tree.c Btrfs: delete unused parameter to btrfs_read_root_item() 2013-05-06 15:55:14 -04:00
scrub.c Btrfs: fix scrub_print_warning to handle skinny metadata extents 2014-06-30 20:09:46 -07:00
send.c Btrfs: send, don't error in the presence of subvols/snapshots 2014-06-30 20:09:46 -07:00
send.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
struct-funcs.c
super.c Btrfs: pause the space balance when remounting to R/O 2013-05-17 21:40:31 -04:00
sysfs.c
transaction.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
transaction.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
tree-defrag.c
tree-log.c Btrfs: fix hole check in log_one_extent 2013-12-20 07:45:12 -08:00
tree-log.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
ulist.c Btrfs: fix crash regarding to ulist_add_merge 2013-08-11 18:35:24 -07:00
ulist.h
version.h
volumes.c fs: btrfs: volumes.c: Fix for possible null pointer dereference 2014-06-30 20:09:46 -07:00
volumes.h Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
xattr.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
xattr.h
zlib.c