summaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-08-11 17:05:45 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-18 01:09:00 -0400
commit87e99511ea54510ffb60b98001d108794d5037f8 (patch)
tree359228828515e02302d9b259a066a1f1118eba0a /fs/buffer.c
parentdad5eb6daa7eeb63d4fc9d982892c59faa07e797 (diff)
downloadop-kernel-dev-87e99511ea54510ffb60b98001d108794d5037f8.zip
op-kernel-dev-87e99511ea54510ffb60b98001d108794d5037f8.tar.gz
kill BH_Ordered flag
Instead of abusing a buffer_head flag just add a variant of sync_dirty_buffer which allows passing the exact type of write flag required. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 50efa33..6c8ad97 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2912,13 +2912,6 @@ int submit_bh(int rw, struct buffer_head * bh)
BUG_ON(buffer_unwritten(bh));
/*
- * 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
*/
if (test_set_buffer_req(bh) && (rw & WRITE))
@@ -3021,7 +3014,7 @@ EXPORT_SYMBOL(ll_rw_block);
* and then start new I/O and then wait upon it. The caller must have a ref on
* the buffer_head.
*/
-int sync_dirty_buffer(struct buffer_head *bh)
+int __sync_dirty_buffer(struct buffer_head *bh, int rw)
{
int ret = 0;
@@ -3030,7 +3023,7 @@ int sync_dirty_buffer(struct buffer_head *bh)
if (test_clear_buffer_dirty(bh)) {
get_bh(bh);
bh->b_end_io = end_buffer_write_sync;
- ret = submit_bh(WRITE_SYNC, bh);
+ ret = submit_bh(rw, bh);
wait_on_buffer(bh);
if (buffer_eopnotsupp(bh)) {
clear_buffer_eopnotsupp(bh);
@@ -3043,6 +3036,12 @@ int sync_dirty_buffer(struct buffer_head *bh)
}
return ret;
}
+EXPORT_SYMBOL(__sync_dirty_buffer);
+
+int sync_dirty_buffer(struct buffer_head *bh)
+{
+ return __sync_dirty_buffer(bh, WRITE_SYNC);
+}
EXPORT_SYMBOL(sync_dirty_buffer);
/*
OpenPOWER on IntegriCloud