Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147875
b: refs/heads/master
c: 4427f0c
h: refs/heads/master
i:
  147873: 16b1388
  147871: 42f93a4
v: v3
  • Loading branch information
Al Viro committed Jun 12, 2009
1 parent 8f5cace commit 9d042f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 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: 224c886643e52e6b4c1143489cd0b289b6c03976
refs/heads/master: 4427f0c36e22e2cd6696b2fe7643e9756a14b3d3
8 changes: 4 additions & 4 deletions trunk/fs/bfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static int bfs_readdir(struct file *f, void *dirent, filldir_t filldir)
const struct file_operations bfs_dir_operations = {
.read = generic_read_dir,
.readdir = bfs_readdir,
.fsync = file_fsync,
.fsync = simple_fsync,
.llseek = generic_file_llseek,
};

Expand Down Expand Up @@ -205,7 +205,7 @@ static int bfs_unlink(struct inode *dir, struct dentry *dentry)
inode->i_nlink = 1;
}
de->ino = 0;
mark_buffer_dirty(bh);
mark_buffer_dirty_inode(bh, dir);
dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
mark_inode_dirty(dir);
inode->i_ctime = dir->i_ctime;
Expand Down Expand Up @@ -267,7 +267,7 @@ static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry,
new_inode->i_ctime = CURRENT_TIME_SEC;
inode_dec_link_count(new_inode);
}
mark_buffer_dirty(old_bh);
mark_buffer_dirty_inode(old_bh, old_dir);
error = 0;

end_rename:
Expand Down Expand Up @@ -320,7 +320,7 @@ static int bfs_add_entry(struct inode *dir, const unsigned char *name,
for (i = 0; i < BFS_NAMELEN; i++)
de->name[i] =
(i < namelen) ? name[i] : 0;
mark_buffer_dirty(bh);
mark_buffer_dirty_inode(bh, dir);
brelse(bh);
return 0;
}
Expand Down
12 changes: 9 additions & 3 deletions trunk/fs/bfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
return ERR_PTR(-EIO);
}

static int bfs_write_inode(struct inode *inode, int unused)
static int bfs_write_inode(struct inode *inode, int wait)
{
struct bfs_sb_info *info = BFS_SB(inode->i_sb);
unsigned int ino = (u16)inode->i_ino;
unsigned long i_sblock;
struct bfs_inode *di;
struct buffer_head *bh;
int block, off;
struct bfs_sb_info *info = BFS_SB(inode->i_sb);
int err = 0;

dprintf("ino=%08x\n", ino);

Expand Down Expand Up @@ -146,9 +147,14 @@ static int bfs_write_inode(struct inode *inode, int unused)
di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1);

mark_buffer_dirty(bh);
if (wait) {
sync_dirty_buffer(bh);
if (buffer_req(bh) && !buffer_uptodate(bh))
err = -EIO;
}
brelse(bh);
mutex_unlock(&info->bfs_lock);
return 0;
return err;
}

static void bfs_delete_inode(struct inode *inode)
Expand Down

0 comments on commit 9d042f1

Please sign in to comment.