Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147843
b: refs/heads/master
c: e500475
h: refs/heads/master
i:
  147841: 1396055
  147839: 00146c8
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 12, 2009
1 parent 1cc39fe commit 84a346c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 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: f3da392e9ff14b9f388e74319e6d195848991c07
refs/heads/master: e5004753388dcf5e1b8a52ac0ab807d232340fbb
27 changes: 15 additions & 12 deletions trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,16 +399,14 @@ void drop_super(struct super_block *sb)

EXPORT_SYMBOL(drop_super);

static inline void write_super(struct super_block *sb)
{
lock_super(sb);
if (sb->s_root && sb->s_dirt)
if (sb->s_op->write_super)
sb->s_op->write_super(sb);
unlock_super(sb);
}

/*
/**
* sync_supers - helper for periodic superblock writeback
*
* Call the write_super method if present on all dirty superblocks in
* the system. This is for the periodic writeback used by most older
* filesystems. For data integrity superblock writeback use
* sync_filesystems() instead.
*
* Note: check the dirty flag before waiting, so we don't
* hold up the sync while mounting a device. (The newly
* mounted device won't need syncing.)
Expand All @@ -420,12 +418,17 @@ void sync_supers(void)
spin_lock(&sb_lock);
restart:
list_for_each_entry(sb, &super_blocks, s_list) {
if (sb->s_dirt) {
if (sb->s_op->write_super && sb->s_dirt) {
sb->s_count++;
spin_unlock(&sb_lock);

down_read(&sb->s_umount);
write_super(sb);
lock_super(sb);
if (sb->s_root && sb->s_dirt)
sb->s_op->write_super(sb);
unlock_super(sb);
up_read(&sb->s_umount);

spin_lock(&sb_lock);
if (__put_super_and_need_restart(sb))
goto restart;
Expand Down

0 comments on commit 84a346c

Please sign in to comment.