Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147879
b: refs/heads/master
c: 80e09fb
h: refs/heads/master
i:
  147877: 1edf714
  147875: 9d042f1
  147871: 42f93a4
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 12, 2009
1 parent 0059951 commit ac8a6d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: 561e47ce7244168788d4ecef9a2271df204b3c89
refs/heads/master: 80e09fb942d38beb19dcffbeb14d496beeb0a989
16 changes: 13 additions & 3 deletions trunk/fs/exofs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ static const struct export_operations exofs_export_ops;
/*
* Write the superblock to the OSD
*/
static void exofs_write_super(struct super_block *sb)
static int exofs_sync_fs(struct super_block *sb, int wait)
{
struct exofs_sb_info *sbi;
struct exofs_fscb *fscb;
struct osd_request *or;
struct osd_obj_id obj;
int ret;
int ret = -ENOMEM;

fscb = kzalloc(sizeof(struct exofs_fscb), GFP_KERNEL);
if (!fscb) {
EXOFS_ERR("exofs_write_super: memory allocation failed.\n");
return;
return -ENOMEM;
}

lock_super(sb);
Expand Down Expand Up @@ -249,6 +249,15 @@ static void exofs_write_super(struct super_block *sb)
unlock_kernel();
unlock_super(sb);
kfree(fscb);
return ret;
}

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

/*
Expand Down Expand Up @@ -493,6 +502,7 @@ static const struct super_operations exofs_sops = {
.delete_inode = exofs_delete_inode,
.put_super = exofs_put_super,
.write_super = exofs_write_super,
.sync_fs = exofs_sync_fs,
.statfs = exofs_statfs,
};

Expand Down

0 comments on commit ac8a6d0

Please sign in to comment.