android_kernel_samsung_msm8976/fs/btrfs
Chris Mason 16e9d54b3f Btrfs: don't delay inode ref updates during log replay
commit 6f8960541b1eb6054a642da48daae2320fddba93 upstream.

Commit 1d52c78afbb (Btrfs: try not to ENOSPC on log replay) added a
check to skip delayed inode updates during log replay because it
confuses the enospc code.  But the delayed processing will end up
ignoring delayed refs from log replay because the inode itself wasn't
put through the delayed code.

This can end up triggering a warning at commit time:

WARNING: CPU: 2 PID: 778 at fs/btrfs/delayed-inode.c:1410 btrfs_assert_delayed_root_empty+0x32/0x34()

Which is repeated for each commit because we never process the delayed
inode ref update.

The fix used here is to change btrfs_delayed_delete_inode_ref to return
an error if we're currently in log replay.  The caller will do the ref
deletion immediately and everything will work properly.

Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-16 06:59:02 -08:00
..
acl.c
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
check-integrity.h
compat.h
compression.c
compression.h
ctree.c
ctree.h
delayed-inode.c Btrfs: don't delay inode ref updates during log replay 2015-01-16 06:59:02 -08:00
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c
dev-replace.h
dir-item.c
disk-io.c Btrfs: fix fs corruption on transaction abort if device supports discard 2015-01-08 09:58:17 -08:00
disk-io.h
export.c
export.h
extent-tree.c Btrfs: fix fs corruption on transaction abort if device supports discard 2015-01-08 09:58:17 -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
extent_map.c Btrfs: do not move em to modified list when unpinning 2015-01-08 09:58:17 -08:00
extent_map.h
file-item.c Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup 2014-11-14 08:48:01 -08:00
file.c
free-space-cache.c
free-space-cache.h
hash.h
inode-item.c
inode-map.c
inode-map.h
inode.c Btrfs: try not to ENOSPC on log replay 2014-10-30 09:35:09 -07:00
ioctl.c
Kconfig
locking.c
locking.h
lzo.c
Makefile
math.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
qgroup.c
raid56.c
raid56.h
rcu-string.h
reada.c
relocation.c Btrfs: fix build_backref_tree issue with multiple shared blocks 2014-10-30 09:35:09 -07:00
root-tree.c
scrub.c Btrfs: fix scrub_print_warning to handle skinny metadata extents 2014-06-30 20:09:46 -07:00
send.c
send.h
struct-funcs.c
super.c
sysfs.c
transaction.c Btrfs: fix race in WAIT_SYNC ioctl 2014-10-30 09:35:09 -07:00
transaction.h
tree-defrag.c
tree-log.c
tree-log.h
ulist.c
ulist.h
version.h
volumes.c
volumes.h
xattr.c
xattr.h
zlib.c