• Home
  • Raw
  • Download

Lines Matching refs:bh

42 	struct buffer_head *bh;  in nilfs_btnode_create_block()  local
44 bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node)); in nilfs_btnode_create_block()
45 if (unlikely(!bh)) in nilfs_btnode_create_block()
48 if (unlikely(buffer_mapped(bh) || buffer_uptodate(bh) || in nilfs_btnode_create_block()
49 buffer_dirty(bh))) { in nilfs_btnode_create_block()
50 brelse(bh); in nilfs_btnode_create_block()
53 memset(bh->b_data, 0, i_blocksize(inode)); in nilfs_btnode_create_block()
54 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_btnode_create_block()
55 bh->b_blocknr = blocknr; in nilfs_btnode_create_block()
56 set_buffer_mapped(bh); in nilfs_btnode_create_block()
57 set_buffer_uptodate(bh); in nilfs_btnode_create_block()
59 unlock_page(bh->b_page); in nilfs_btnode_create_block()
60 put_page(bh->b_page); in nilfs_btnode_create_block()
61 return bh; in nilfs_btnode_create_block()
68 struct buffer_head *bh; in nilfs_btnode_submit_block() local
73 bh = nilfs_grab_buffer(inode, btnc, blocknr, BIT(BH_NILFS_Node)); in nilfs_btnode_submit_block()
74 if (unlikely(!bh)) in nilfs_btnode_submit_block()
78 page = bh->b_page; in nilfs_btnode_submit_block()
80 if (buffer_uptodate(bh) || buffer_dirty(bh)) in nilfs_btnode_submit_block()
92 brelse(bh); in nilfs_btnode_submit_block()
99 if (pblocknr != *submit_ptr + 1 || !trylock_buffer(bh)) { in nilfs_btnode_submit_block()
101 brelse(bh); in nilfs_btnode_submit_block()
105 lock_buffer(bh); in nilfs_btnode_submit_block()
107 if (buffer_uptodate(bh)) { in nilfs_btnode_submit_block()
108 unlock_buffer(bh); in nilfs_btnode_submit_block()
112 set_buffer_mapped(bh); in nilfs_btnode_submit_block()
113 bh->b_bdev = inode->i_sb->s_bdev; in nilfs_btnode_submit_block()
114 bh->b_blocknr = pblocknr; /* set block address for read */ in nilfs_btnode_submit_block()
115 bh->b_end_io = end_buffer_read_sync; in nilfs_btnode_submit_block()
116 get_bh(bh); in nilfs_btnode_submit_block()
117 submit_bh(mode, mode_flags, bh); in nilfs_btnode_submit_block()
118 bh->b_blocknr = blocknr; /* set back to the given block address */ in nilfs_btnode_submit_block()
122 *pbh = bh; in nilfs_btnode_submit_block()
137 void nilfs_btnode_delete(struct buffer_head *bh) in nilfs_btnode_delete() argument
140 struct page *page = bh->b_page; in nilfs_btnode_delete()
148 nilfs_forget_buffer(bh); in nilfs_btnode_delete()
176 obh = ctxt->bh; in nilfs_btnode_prepare_change_key()
238 struct buffer_head *obh = ctxt->bh, *nbh = ctxt->newbh; in nilfs_btnode_commit_change_key()
267 ctxt->bh = nbh; in nilfs_btnode_commit_change_key()
289 unlock_page(ctxt->bh->b_page); in nilfs_btnode_abort_change_key()