Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135583
b: refs/heads/master
c: a2a9537
h: refs/heads/master
i:
  135581: 486e9fa
  135579: 7ac035f
  135575: c24b78e
  135567: 8ac1e82
  135551: 7784023
v: v3
  • Loading branch information
Jens Axboe committed Mar 26, 2009
1 parent b700582 commit 7731bfe
Show file tree
Hide file tree
Showing 3 changed files with 23 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: 6933c02e9cc47c2df3c016621a013ec79fb4203f
refs/heads/master: a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4
11 changes: 9 additions & 2 deletions trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
return 0;
}

static void do_emergency_remount(unsigned long foo)
static void do_emergency_remount(struct work_struct *work)
{
struct super_block *sb;

Expand All @@ -697,12 +697,19 @@ static void do_emergency_remount(unsigned long foo)
spin_lock(&sb_lock);
}
spin_unlock(&sb_lock);
kfree(work);
printk("Emergency Remount complete\n");
}

void emergency_remount(void)
{
pdflush_operation(do_emergency_remount, 0);
struct work_struct *work;

work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (work) {
INIT_WORK(work, do_emergency_remount);
schedule_work(work);
}
}

/*
Expand Down
14 changes: 13 additions & 1 deletion trunk/fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,21 @@ SYSCALL_DEFINE0(sync)
return 0;
}

static void do_sync_work(struct work_struct *work)
{
do_sync(0);
kfree(work);
}

void emergency_sync(void)
{
pdflush_operation(do_sync, 0);
struct work_struct *work;

work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (work) {
INIT_WORK(work, do_sync_work);
schedule_work(work);
}
}

/*
Expand Down

0 comments on commit 7731bfe

Please sign in to comment.