| 878 | } |
| 879 | |
| 880 | int sync_dirty_buffer(struct buffer_head *bh) |
| 881 | { |
| 882 | int ret = 0; |
| 883 | |
| 884 | ASSERT(atomic_read(&bh->b_count) <= 1); |
| 885 | lock_buffer(bh); |
| 886 | if (test_clear_buffer_dirty(bh)) { |
| 887 | get_bh(bh); |
| 888 | ret = submit_bh(WRITE, bh); |
| 889 | wait_on_buffer(bh); |
| 890 | } else { |
| 891 | unlock_buffer(bh); |
| 892 | } |
| 893 | return ret; |
| 894 | } |
| 895 | |
| 896 | void mark_buffer_dirty(struct buffer_head *bh) |
| 897 | { |
no test coverage detected