diff options
Diffstat (limited to 'fs/nilfs2/btnode.c')
-rw-r--r-- | fs/nilfs2/btnode.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index f78ab1044d1d..5115814cb745 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c | |||
@@ -37,15 +37,7 @@ | |||
37 | 37 | ||
38 | void nilfs_btnode_cache_init_once(struct address_space *btnc) | 38 | void nilfs_btnode_cache_init_once(struct address_space *btnc) |
39 | { | 39 | { |
40 | memset(btnc, 0, sizeof(*btnc)); | 40 | nilfs_mapping_init_once(btnc); |
41 | INIT_RADIX_TREE(&btnc->page_tree, GFP_ATOMIC); | ||
42 | spin_lock_init(&btnc->tree_lock); | ||
43 | INIT_LIST_HEAD(&btnc->private_list); | ||
44 | spin_lock_init(&btnc->private_lock); | ||
45 | |||
46 | spin_lock_init(&btnc->i_mmap_lock); | ||
47 | INIT_RAW_PRIO_TREE_ROOT(&btnc->i_mmap); | ||
48 | INIT_LIST_HEAD(&btnc->i_mmap_nonlinear); | ||
49 | } | 41 | } |
50 | 42 | ||
51 | static const struct address_space_operations def_btnode_aops = { | 43 | static const struct address_space_operations def_btnode_aops = { |
@@ -55,12 +47,7 @@ static const struct address_space_operations def_btnode_aops = { | |||
55 | void nilfs_btnode_cache_init(struct address_space *btnc, | 47 | void nilfs_btnode_cache_init(struct address_space *btnc, |
56 | struct backing_dev_info *bdi) | 48 | struct backing_dev_info *bdi) |
57 | { | 49 | { |
58 | btnc->host = NULL; /* can safely set to host inode ? */ | 50 | nilfs_mapping_init(btnc, bdi, &def_btnode_aops); |
59 | btnc->flags = 0; | ||
60 | mapping_set_gfp_mask(btnc, GFP_NOFS); | ||
61 | btnc->assoc_mapping = NULL; | ||
62 | btnc->backing_dev_info = bdi; | ||
63 | btnc->a_ops = &def_btnode_aops; | ||
64 | } | 51 | } |
65 | 52 | ||
66 | void nilfs_btnode_cache_clear(struct address_space *btnc) | 53 | void nilfs_btnode_cache_clear(struct address_space *btnc) |