diff options
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 7b0cc4fe9f0d..139b113e8338 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -114,7 +114,18 @@ static int nilfs_btree_get_block(const struct nilfs_btree *btree, __u64 ptr, | |||
114 | { | 114 | { |
115 | struct address_space *btnc = | 115 | struct address_space *btnc = |
116 | &NILFS_BMAP_I((struct nilfs_bmap *)btree)->i_btnode_cache; | 116 | &NILFS_BMAP_I((struct nilfs_bmap *)btree)->i_btnode_cache; |
117 | return nilfs_btnode_get(btnc, ptr, 0, bhp, 0); | 117 | int err; |
118 | |||
119 | err = nilfs_btnode_submit_block(btnc, ptr, 0, bhp); | ||
120 | if (err) | ||
121 | return err == -EEXIST ? 0 : err; | ||
122 | |||
123 | wait_on_buffer(*bhp); | ||
124 | if (!buffer_uptodate(*bhp)) { | ||
125 | brelse(*bhp); | ||
126 | return -EIO; | ||
127 | } | ||
128 | return 0; | ||
118 | } | 129 | } |
119 | 130 | ||
120 | static int nilfs_btree_get_new_block(const struct nilfs_btree *btree, | 131 | static int nilfs_btree_get_new_block(const struct nilfs_btree *btree, |