• Home
  • Raw
  • Download

Lines Matching refs:bh

33 	struct buffer_head *bh;  in nilfs_btnode_create_block()  local
35 bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node)); in nilfs_btnode_create_block()
36 if (unlikely(!bh)) in nilfs_btnode_create_block()
39 if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) || in nilfs_btnode_create_block()
40 buffer_dirty(bh))) { in nilfs_btnode_create_block()
41 brelse(bh); in nilfs_btnode_create_block()
44 memset(bh->b_data, 0, i_blocksize(inode)); in nilfs_btnode_create_block()
45 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_btnode_create_block()
46 bh->b_blocknr = blocknr; in nilfs_btnode_create_block()
47 set_buffer_mapped(bh); in nilfs_btnode_create_block()
48 set_buffer_uptodate(bh); in nilfs_btnode_create_block()
50 unlock_page(bh->b_page); in nilfs_btnode_create_block()
51 put_page(bh->b_page); in nilfs_btnode_create_block()
52 return bh; in nilfs_btnode_create_block()
59 struct buffer_head *bh; in nilfs_btnode_submit_block() local
64 bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node)); in nilfs_btnode_submit_block()
65 if (unlikely(!bh)) in nilfs_btnode_submit_block()
69 page = bh->b_page; in nilfs_btnode_submit_block()
71 if (buffer_uptodate(bh) || buffer_dirty(bh)) in nilfs_btnode_submit_block()
83 brelse(bh); in nilfs_btnode_submit_block()
90 if (pblocknr != *submit_ptr + 1 || !trylock_buffer(bh)) { in nilfs_btnode_submit_block()
92 brelse(bh); in nilfs_btnode_submit_block()
96 lock_buffer(bh); in nilfs_btnode_submit_block()
98 if (buffer_uptodate(bh)) { in nilfs_btnode_submit_block()
99 unlock_buffer(bh); in nilfs_btnode_submit_block()
103 set_buffer_mapped(bh); in nilfs_btnode_submit_block()
104 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_btnode_submit_block()
105 bh->b_blocknr = pblocknr; /* set block address for read */ in nilfs_btnode_submit_block()
106 bh->b_end_io = end_buffer_read_sync; in nilfs_btnode_submit_block()
107 get_bh(bh); in nilfs_btnode_submit_block()
108 submit_bh(mode, mode_flags, bh); in nilfs_btnode_submit_block()
109 bh->b_blocknr = blocknr; /* set back to the given block address */ in nilfs_btnode_submit_block()
113 *pbh = bh; in nilfs_btnode_submit_block()
128 void nilfs_btnode_delete(struct buffer_head *bh) in nilfs_btnode_delete() argument
131 struct page *page = bh->b_page; in nilfs_btnode_delete()
139 nilfs_forget_buffer(bh); in nilfs_btnode_delete()
167 obh = ctxt->bh; in nilfs_btnode_prepare_change_key()
222 struct buffer_head *obh = ctxt->bh, *nbh = ctxt->newbh; in nilfs_btnode_commit_change_key()
250 ctxt->bh = nbh; in nilfs_btnode_commit_change_key()
270 unlock_page(ctxt->bh->b_page); in nilfs_btnode_abort_change_key()