| 842 | } |
| 843 | |
| 844 | void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]) |
| 845 | { |
| 846 | int i; |
| 847 | |
| 848 | for (i = 0; i < nr; i++) { |
| 849 | |
| 850 | struct buffer_head *bh = bhs[i]; |
| 851 | |
| 852 | if (rw == SWRITE) |
| 853 | lock_buffer(bh); |
| 854 | else if (test_set_buffer_locked(bh)) |
| 855 | continue; |
| 856 | |
| 857 | if (rw == WRITE || rw == SWRITE) { |
| 858 | if (test_clear_buffer_dirty(bh)) { |
| 859 | get_bh(bh); |
| 860 | submit_bh(WRITE, bh); |
| 861 | continue; |
| 862 | } |
| 863 | } else { |
| 864 | if (!buffer_uptodate(bh)) { |
| 865 | get_bh(bh); |
| 866 | submit_bh(rw, bh); |
| 867 | continue; |
| 868 | } |
| 869 | } |
| 870 | unlock_buffer(bh); |
| 871 | } |
| 872 | } |
| 873 | |
| 874 | int bh_submit_read(struct buffer_head *bh) |
| 875 | { |
no test coverage detected