Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147883
b: refs/heads/master
c: 7fbc6df
h: refs/heads/master
i:
  147881: c6c4dbf
  147879: ac8a6d0
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 12, 2009
1 parent a5ceedd commit 8ac257f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 58bc5bbb873eb5d86126a3fd3ff02aaa69ec15d0
refs/heads/master: 7fbc6df0e7a561a313f49faa77829d5de45a97f8
16 changes: 11 additions & 5 deletions trunk/fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,14 @@ static void hfsplus_clear_inode(struct inode *inode)
}
}

static void hfsplus_write_super(struct super_block *sb)
static int hfsplus_sync_fs(struct super_block *sb, int wait)
{
struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr;

dprint(DBG_SUPER, "hfsplus_write_super\n");

lock_super(sb);
sb->s_dirt = 0;
if (sb->s_flags & MS_RDONLY)
/* warn? */
goto out;

vhdr->free_blocks = cpu_to_be32(HFSPLUS_SB(sb).free_blocks);
vhdr->next_alloc = cpu_to_be32(HFSPLUS_SB(sb).next_alloc);
Expand Down Expand Up @@ -194,8 +191,16 @@ static void hfsplus_write_super(struct super_block *sb)
}
HFSPLUS_SB(sb).flags &= ~HFSPLUS_SB_WRITEBACKUP;
}
out:
unlock_super(sb);
return 0;
}

static void hfsplus_write_super(struct super_block *sb)
{
if (!(sb->s_flags & MS_RDONLY))
hfsplus_sync_fs(sb, 1);
else
sb->s_dirt = 0;
}

static void hfsplus_put_super(struct super_block *sb)
Expand Down Expand Up @@ -290,6 +295,7 @@ static const struct super_operations hfsplus_sops = {
.clear_inode = hfsplus_clear_inode,
.put_super = hfsplus_put_super,
.write_super = hfsplus_write_super,
.sync_fs = hfsplus_sync_fs,
.statfs = hfsplus_statfs,
.remount_fs = hfsplus_remount,
.show_options = hfsplus_show_options,
Expand Down

0 comments on commit 8ac257f

Please sign in to comment.