OpenCloudOS-Kernel/fs/f2fs
Jason Hrycay 1127a3d448 f2fs: move f2fs_balance_fs from truncate to punch_hole
Move the f2fs_balance_fs out of the truncate_hole function and only
perform that in punch_hole use case.  The commit:

  ed60b1644e7f7e5dd67d21caf7e4425dff05dad0

intended to do this but moved it into truncate_hole to cover more
cases.  However, a deadlock scenario is possible when deleting an inode
entry under specific conditions:

 f2fs_delete_entry()
     mutex_lock_op(sbi, DENTRY_OPS);
     truncate_hole()
         f2fs_balance_fs()
             mutex_lock(&sbi->gc_mutex);
             f2fs_gc()
                 write_checkpoint()
                     block_operations()
                         mutex_lock_op(sbi, DENTRY_OPS);

Lets move it into the punch_hole case to cover the original intent of
avoiding it during fallocate's expand_inode_data case.

Change-Id: I29f8ea1056b0b88b70ba8652d901b6e8431bb27e
Signed-off-by: Jason Hrycay <jason.hrycay@motorola.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-09 17:22:45 +09:00
..
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
acl.c f2fs: avoid null dereference in f2fs_acl_from_disk 2013-01-04 09:46:27 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
data.c f2fs: add NULL pointer check 2013-04-03 17:27:52 +09:00
debug.c f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
dir.c f2fs: align f2fs maximum name length to linux based filesystem 2013-03-18 21:00:35 +09:00
f2fs.h f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
file.c f2fs: move f2fs_balance_fs from truncate to punch_hole 2013-04-09 17:22:45 +09:00
gc.c f2fs: avoid race for summary information 2013-04-03 17:27:51 +09:00
gc.h f2fs: clarify and enhance the f2fs_gc flow 2013-02-12 07:15:02 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: do not skip writing file meta during fsync 2013-03-27 09:16:16 +09:00
namei.c f2fs: fix to give correct parent inode number for roll forward 2013-03-27 09:16:25 +09:00
node.c f2fs: reduce redundant spin_lock operations 2013-04-03 22:19:03 +09:00
node.h f2fs: remove redundant lock_page calls 2013-04-03 17:27:42 +09:00
recovery.c f2fs: fix the recovery flow to handle errors correctly 2013-03-27 09:16:06 +09:00
segment.c f2fs: fix the bitmap consistency of dirty segments 2013-04-03 17:27:51 +09:00
segment.h f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
super.c f2fs: avoid race for summary information 2013-04-03 17:27:51 +09:00
xattr.c f2fs: reorganize f2fs_setxattr 2013-03-20 18:30:15 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00