Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147884
b: refs/heads/master
c: ad43ffd
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 12, 2009
1 parent 8ac257f commit c79ed7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 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: 7fbc6df0e7a561a313f49faa77829d5de45a97f8
refs/heads/master: ad43ffdeea0a7bd3e6036c4aeec2e6699aef8ac7
19 changes: 13 additions & 6 deletions trunk/fs/sysv/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@
#include <asm/byteorder.h>
#include "sysv.h"

/* This is only called on sync() and umount(), when s_dirt=1. */
static void sysv_write_super(struct super_block *sb)
static int sysv_sync_fs(struct super_block *sb, int wait)
{
struct sysv_sb_info *sbi = SYSV_SB(sb);
unsigned long time = get_seconds(), old_time;

lock_super(sb);
lock_kernel();
if (sb->s_flags & MS_RDONLY)
goto clean;

/*
* If we are going to write out the super block,
Expand All @@ -54,10 +51,19 @@ static void sysv_write_super(struct super_block *sb)
*sbi->s_sb_time = cpu_to_fs32(sbi, time);
mark_buffer_dirty(sbi->s_bh2);
}
clean:
sb->s_dirt = 0;

unlock_kernel();
unlock_super(sb);

return 0;
}

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

static int sysv_remount(struct super_block *sb, int *flags, char *data)
Expand Down Expand Up @@ -345,6 +351,7 @@ const struct super_operations sysv_sops = {
.delete_inode = sysv_delete_inode,
.put_super = sysv_put_super,
.write_super = sysv_write_super,
.sync_fs = sysv_sync_fs,
.remount_fs = sysv_remount,
.statfs = sysv_statfs,
};
Expand Down

0 comments on commit c79ed7c

Please sign in to comment.