aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2005-01-03 04:11:57 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-03 04:11:57 -0800
commit3bc5bf4e521ba379dff14e027e2b374580f8246e (patch)
tree9568a471f61783a64410214b8f3fd2e9458a5597 /fs
parent0a299616d4b14ec5b72ec3965ea38f0460e7940c (diff)
downloadhistory-3bc5bf4e521ba379dff14e027e2b374580f8246e.tar.gz
[PATCH] Expose reiserfs_sync_fs()
Attached patch exposes reiserfs_sync_fs(). This call is needed by the new quota code to write data to disk on quotaoff so that userspace can see them afterwards. Chris Mason agrees with the patch. Make reiserfs provide the sync_fs() function so that the quota code has a way to reliably force a transaction to disk. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 38b10fdbc3e1c7..465a6ad755a9e0 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -62,7 +62,7 @@ static int is_any_reiserfs_magic_string (struct reiserfs_super_block * rs)
static int reiserfs_remount (struct super_block * s, int * flags, char * data);
static int reiserfs_statfs (struct super_block * s, struct kstatfs * buf);
-static void reiserfs_sync_fs (struct super_block * s)
+static int reiserfs_sync_fs (struct super_block * s, int wait)
{
if (!(s->s_flags & MS_RDONLY)) {
struct reiserfs_transaction_handle th;
@@ -76,11 +76,12 @@ static void reiserfs_sync_fs (struct super_block * s)
} else {
s->s_dirt = 0;
}
+ return 0;
}
static void reiserfs_write_super(struct super_block *s)
{
- reiserfs_sync_fs(s);
+ reiserfs_sync_fs(s, 1);
}
static void reiserfs_write_super_lockfs (struct super_block * s)
@@ -526,6 +527,7 @@ struct super_operations reiserfs_sops =
.clear_inode = reiserfs_clear_inode,
.put_super = reiserfs_put_super,
.write_super = reiserfs_write_super,
+ .sync_fs = reiserfs_sync_fs,
.write_super_lockfs = reiserfs_write_super_lockfs,
.unlockfs = reiserfs_unlockfs,
.statfs = reiserfs_statfs,