Lines Matching refs:bh
42 static int write_mmp_block(struct super_block *sb, struct buffer_head *bh) in write_mmp_block() argument
44 struct mmp_struct *mmp = (struct mmp_struct *)(bh->b_data); in write_mmp_block()
52 lock_buffer(bh); in write_mmp_block()
53 bh->b_end_io = end_buffer_write_sync; in write_mmp_block()
54 get_bh(bh); in write_mmp_block()
55 submit_bh(REQ_OP_WRITE, REQ_SYNC | REQ_META | REQ_PRIO, bh); in write_mmp_block()
56 wait_on_buffer(bh); in write_mmp_block()
58 if (unlikely(!buffer_uptodate(bh))) in write_mmp_block()
68 static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, in read_mmp_block() argument
74 if (*bh) in read_mmp_block()
75 clear_buffer_uptodate(*bh); in read_mmp_block()
80 if (!*bh) { in read_mmp_block()
81 *bh = sb_getblk(sb, mmp_block); in read_mmp_block()
82 if (!*bh) { in read_mmp_block()
88 get_bh(*bh); in read_mmp_block()
89 lock_buffer(*bh); in read_mmp_block()
90 (*bh)->b_end_io = end_buffer_read_sync; in read_mmp_block()
91 submit_bh(REQ_OP_READ, REQ_META | REQ_PRIO, *bh); in read_mmp_block()
92 wait_on_buffer(*bh); in read_mmp_block()
93 if (!buffer_uptodate(*bh)) { in read_mmp_block()
97 mmp = (struct mmp_struct *)((*bh)->b_data); in read_mmp_block()
108 brelse(*bh); in read_mmp_block()
109 *bh = NULL; in read_mmp_block()
135 struct buffer_head *bh = ((struct mmpd_data *) data)->bh; in kmmpd() local
148 mmp = (struct mmp_struct *)(bh->b_data); in kmmpd()
157 bdevname(bh->b_bdev, mmp->mmp_bdevname); in kmmpd()
170 retval = write_mmp_block(sb, bh); in kmmpd()
245 retval = write_mmp_block(sb, bh); in kmmpd()
250 brelse(bh); in kmmpd()
276 struct buffer_head *bh = NULL; in ext4_multi_mount_protect() local
290 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
294 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
328 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
331 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
345 retval = write_mmp_block(sb, bh); in ext4_multi_mount_protect()
357 retval = read_mmp_block(sb, &bh, mmp_block); in ext4_multi_mount_protect()
360 mmp = (struct mmp_struct *)(bh->b_data); in ext4_multi_mount_protect()
373 mmpd_data->bh = bh; in ext4_multi_mount_protect()
379 bdevname(bh->b_bdev, in ext4_multi_mount_protect()
392 brelse(bh); in ext4_multi_mount_protect()