kernel-ark/fs/f2fs
Namjae Jeon d7cc950b4c f2fs: optimise the truncate_data_blocks_range() range
The function truncate_data_blocks_range() decrements the valid
block count of inode via dec_valid_block_count(). Since this
function updates the i_blocks field of inode, we can update this
field once we have calculated total the number of blocks
to be freed.

Therefore we can decrement valid blocks outside of the for loop.

	if (nr_free) {
+		dec_valid_block_count(sbi, dn->inode, nr_free);
 		set_page_dirty(dn->node_page);
 		sync_inode_page(dn);
 	}

'nr_free' tells the total number of blocks freed. So, we can
just directly pass this value to dec_valid_block_count() and update
the i_blocks.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-06-14 09:04:42 +09:00
..
acl.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: fix iget/iput of dir during recovery 2013-06-07 13:21:37 +09:00
data.c f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
debug.c f2fs: use list_for_each_entry rather than list_for_each_entry_safe 2013-05-28 15:03:02 +09:00
dir.c f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
f2fs.h f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
file.c f2fs: optimise the truncate_data_blocks_range() range 2013-06-14 09:04:42 +09:00
gc.c f2fs: reorganise the function get_victim_by_default 2013-06-06 14:20:46 +09:00
gc.h f2fs: avoid frequent background GC 2013-04-26 10:35:03 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: fix wrong condition check 2013-05-28 15:03:03 +09:00
Kconfig f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: fix i_blocks translation on various types of files 2013-06-11 16:01:09 +09:00
node.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
node.h f2fs: optimize several routines in node.h 2013-05-28 15:03:05 +09:00
recovery.c f2fs: fix iget/iput of dir during recovery 2013-06-07 13:21:37 +09:00
segment.c f2fs: push some variables to debug part 2013-05-28 15:03:05 +09:00
segment.h f2fs: modify the number of issued pages to merge IOs 2013-04-30 12:07:32 +09:00
super.c f2fs: set sb->s_fs_info before calling parse_options() 2013-06-11 16:01:08 +09:00
xattr.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
xattr.h f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00