Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147878
b: refs/heads/master
c: 561e47c
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jun 12, 2009
1 parent 1edf714 commit 0059951
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 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: e28964365faf3b9961695eb62b48cbc9f2a2a245
refs/heads/master: 561e47ce7244168788d4ecef9a2271df204b3c89
32 changes: 21 additions & 11 deletions trunk/fs/bfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,26 @@ static void bfs_delete_inode(struct inode *inode)
clear_inode(inode);
}

static int bfs_sync_fs(struct super_block *sb, int wait)
{
struct bfs_sb_info *info = BFS_SB(sb);

mutex_lock(&info->bfs_lock);
mark_buffer_dirty(info->si_sbh);
sb->s_dirt = 0;
mutex_unlock(&info->bfs_lock);

return 0;
}

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

static void bfs_put_super(struct super_block *s)
{
struct bfs_sb_info *info = BFS_SB(s);
Expand Down Expand Up @@ -254,17 +274,6 @@ static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
}

static void bfs_write_super(struct super_block *s)
{
struct bfs_sb_info *info = BFS_SB(s);

mutex_lock(&info->bfs_lock);
if (!(s->s_flags & MS_RDONLY))
mark_buffer_dirty(info->si_sbh);
s->s_dirt = 0;
mutex_unlock(&info->bfs_lock);
}

static struct kmem_cache *bfs_inode_cachep;

static struct inode *bfs_alloc_inode(struct super_block *sb)
Expand Down Expand Up @@ -312,6 +321,7 @@ static const struct super_operations bfs_sops = {
.delete_inode = bfs_delete_inode,
.put_super = bfs_put_super,
.write_super = bfs_write_super,
.sync_fs = bfs_sync_fs,
.statfs = bfs_statfs,
};

Expand Down

0 comments on commit 0059951

Please sign in to comment.