Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23570
b: refs/heads/master
c: d25b9a1
h: refs/heads/master
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Mar 25, 2006
1 parent 22cbbe8 commit 9fbf032
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11b8448751ba114416c63899638a8e473ebd21e7
refs/heads/master: d25b9a1ff0741e71a46f37f45263b5ddcbc948c4
30 changes: 11 additions & 19 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,7 @@ int sync_blockdev(struct block_device *bdev)
}
EXPORT_SYMBOL(sync_blockdev);

/*
* Write out and wait upon all dirty data associated with this
* superblock. Filesystem data as well as the underlying block
* device. Takes the superblock lock.
*/
int fsync_super(struct super_block *sb)
static void __fsync_super(struct super_block *sb)
{
sync_inodes_sb(sb, 0);
DQUOT_SYNC(sb);
Expand All @@ -177,7 +172,16 @@ int fsync_super(struct super_block *sb)
sb->s_op->sync_fs(sb, 1);
sync_blockdev(sb->s_bdev);
sync_inodes_sb(sb, 1);
}

/*
* Write out and wait upon all dirty data associated with this
* superblock. Filesystem data as well as the underlying block
* device. Takes the superblock lock.
*/
int fsync_super(struct super_block *sb)
{
__fsync_super(sb);
return sync_blockdev(sb->s_bdev);
}

Expand Down Expand Up @@ -216,19 +220,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
sb->s_frozen = SB_FREEZE_WRITE;
smp_wmb();

sync_inodes_sb(sb, 0);
DQUOT_SYNC(sb);

lock_super(sb);
if (sb->s_dirt && sb->s_op->write_super)
sb->s_op->write_super(sb);
unlock_super(sb);

if (sb->s_op->sync_fs)
sb->s_op->sync_fs(sb, 1);

sync_blockdev(sb->s_bdev);
sync_inodes_sb(sb, 1);
__fsync_super(sb);

sb->s_frozen = SB_FREEZE_TRANS;
smp_wmb();
Expand Down

0 comments on commit 9fbf032

Please sign in to comment.