diff options
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 38653e36e225..ac78d4c19b3b 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
| @@ -2926,14 +2926,17 @@ int submit_bh(int rw, struct buffer_head * bh) | |||
| 2926 | BUG_ON(!buffer_mapped(bh)); | 2926 | BUG_ON(!buffer_mapped(bh)); |
| 2927 | BUG_ON(!bh->b_end_io); | 2927 | BUG_ON(!bh->b_end_io); |
| 2928 | 2928 | ||
| 2929 | if (buffer_ordered(bh) && (rw == WRITE)) | 2929 | /* |
| 2930 | rw = WRITE_BARRIER; | 2930 | * Mask in barrier bit for a write (could be either a WRITE or a |
| 2931 | * WRITE_SYNC | ||
| 2932 | */ | ||
| 2933 | if (buffer_ordered(bh) && (rw & WRITE)) | ||
| 2934 | rw |= WRITE_BARRIER; | ||
| 2931 | 2935 | ||
| 2932 | /* | 2936 | /* |
| 2933 | * Only clear out a write error when rewriting, should this | 2937 | * Only clear out a write error when rewriting |
| 2934 | * include WRITE_SYNC as well? | ||
| 2935 | */ | 2938 | */ |
| 2936 | if (test_set_buffer_req(bh) && (rw == WRITE || rw == WRITE_BARRIER)) | 2939 | if (test_set_buffer_req(bh) && (rw & WRITE)) |
| 2937 | clear_buffer_write_io_error(bh); | 2940 | clear_buffer_write_io_error(bh); |
| 2938 | 2941 | ||
| 2939 | /* | 2942 | /* |
