summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-03-25 10:43:16 -0700
committerChris Mason <clm@fb.com>2015-03-25 10:43:16 -0700
commit9deed229fa8a83bb5cd713b2d2a8e5c022a4b45b (patch)
treea98200a7176d8066099fde32e9691c7c36f66b1e /fs/btrfs/disk-io.c
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
parent258ece02126a67af263746e1ae5f8ddf0d492e14 (diff)
downloadop-kernel-dev-9deed229fa8a83bb5cd713b2d2a8e5c022a4b45b.zip
op-kernel-dev-9deed229fa8a83bb5cd713b2d2a8e5c022a4b45b.tar.gz
Merge branch 'cleanups-for-4.1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.1
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 639f266..6aaaf98 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -302,7 +302,7 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
offset += cur_len;
}
if (csum_size > sizeof(inline_result)) {
- result = kzalloc(csum_size * sizeof(char), GFP_NOFS);
+ result = kzalloc(csum_size, GFP_NOFS);
if (!result)
return 1;
} else {
@@ -2276,7 +2276,7 @@ int open_ctree(struct super_block *sb,
fs_info->free_chunk_space = 0;
fs_info->tree_mod_log = RB_ROOT;
fs_info->commit_interval = BTRFS_DEFAULT_COMMIT_INTERVAL;
- fs_info->avg_delayed_ref_runtime = div64_u64(NSEC_PER_SEC, 64);
+ fs_info->avg_delayed_ref_runtime = NSEC_PER_SEC >> 6; /* div by 64 */
/* readahead state */
INIT_RADIX_TREE(&fs_info->reada_tree, GFP_NOFS & ~__GFP_WAIT);
spin_lock_init(&fs_info->reada_lock);
OpenPOWER on IntegriCloud