aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2005-05-01 11:58:47 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:47 -0400
commitd59dd4620fb8d6422555a9e2b82a707718e68327 (patch)
tree78205657d24efcaa3f8314064951ac3814ed95a7 /fs
parent0d8d4d42f2d00eb65262b49f4edd4cf7ef4eb6fc (diff)
[PATCH] use smp_mb/wmb/rmb where possible
Replace a number of memory barriers with smp_ variants. This means we won't take the unnecessary hit on UP machines. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 665db84a1f9f..188365c79204 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -218,7 +218,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
218 sb = get_super(bdev); 218 sb = get_super(bdev);
219 if (sb && !(sb->s_flags & MS_RDONLY)) { 219 if (sb && !(sb->s_flags & MS_RDONLY)) {
220 sb->s_frozen = SB_FREEZE_WRITE; 220 sb->s_frozen = SB_FREEZE_WRITE;
221 wmb(); 221 smp_wmb();
222 222
223 sync_inodes_sb(sb, 0); 223 sync_inodes_sb(sb, 0);
224 DQUOT_SYNC(sb); 224 DQUOT_SYNC(sb);
@@ -235,7 +235,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
235 sync_inodes_sb(sb, 1); 235 sync_inodes_sb(sb, 1);
236 236
237 sb->s_frozen = SB_FREEZE_TRANS; 237 sb->s_frozen = SB_FREEZE_TRANS;
238 wmb(); 238 smp_wmb();
239 239
240 sync_blockdev(sb->s_bdev); 240 sync_blockdev(sb->s_bdev);
241 241
@@ -263,7 +263,7 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb)
263 if (sb->s_op->unlockfs) 263 if (sb->s_op->unlockfs)
264 sb->s_op->unlockfs(sb); 264 sb->s_op->unlockfs(sb);
265 sb->s_frozen = SB_UNFROZEN; 265 sb->s_frozen = SB_UNFROZEN;
266 wmb(); 266 smp_wmb();
267 wake_up(&sb->s_wait_unfrozen); 267 wake_up(&sb->s_wait_unfrozen);
268 drop_super(sb); 268 drop_super(sb);
269 } 269 }