diff options
author | Steve French <sfrench@us.ibm.com> | 2008-08-28 02:47:00 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-08-28 02:47:00 +0000 |
commit | 6405c9cd9bf7b1c35ed76ef8ee3e217056285702 (patch) | |
tree | 0659c9ae17d1375f185f88f4f7fef1a667f375d8 /fs/buffer.c | |
parent | bcc55c6664a90146149ba0fd93052adc94287b9f (diff) | |
parent | 4c246edd2550304df5b766cc841584b2bb058843 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
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 38653e36e22..ac78d4c19b3 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2926,14 +2926,17 @@ int submit_bh(int rw, struct buffer_head * bh) BUG_ON(!buffer_mapped(bh)); BUG_ON(!bh->b_end_io); - if (buffer_ordered(bh) && (rw == WRITE)) - rw = WRITE_BARRIER; + /* + * Mask in barrier bit for a write (could be either a WRITE or a + * WRITE_SYNC + */ + if (buffer_ordered(bh) && (rw & WRITE)) + rw |= WRITE_BARRIER; /* - * Only clear out a write error when rewriting, should this - * include WRITE_SYNC as well? + * Only clear out a write error when rewriting */ - if (test_set_buffer_req(bh) && (rw == WRITE || rw == WRITE_BARRIER)) + if (test_set_buffer_req(bh) && (rw & WRITE)) clear_buffer_write_io_error(bh); /* |