diff options
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 1b5321c0bcac..d3faa0bba171 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -370,8 +370,16 @@ static int nilfs_btree_node_broken(const struct nilfs_btree_node *node, | |||
370 | 370 | ||
371 | int nilfs_btree_broken_node_block(struct buffer_head *bh) | 371 | int nilfs_btree_broken_node_block(struct buffer_head *bh) |
372 | { | 372 | { |
373 | return nilfs_btree_node_broken((struct nilfs_btree_node *)bh->b_data, | 373 | int ret; |
374 | |||
375 | if (buffer_nilfs_checked(bh)) | ||
376 | return 0; | ||
377 | |||
378 | ret = nilfs_btree_node_broken((struct nilfs_btree_node *)bh->b_data, | ||
374 | bh->b_size, bh->b_blocknr); | 379 | bh->b_size, bh->b_blocknr); |
380 | if (likely(!ret)) | ||
381 | set_buffer_nilfs_checked(bh); | ||
382 | return ret; | ||
375 | } | 383 | } |
376 | 384 | ||
377 | static struct nilfs_btree_node * | 385 | static struct nilfs_btree_node * |