summaryrefslogtreecommitdiffstats
path: root/fs/bfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 07:15:58 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-12 03:36:14 +0200
commit4427f0c36e22e2cd6696b2fe7643e9756a14b3d3 (patch)
tree1d3035350178d974a1099b7795dc4a5f64b29fe8 /fs/bfs/inode.c
parentFix adfs GET_FRAG_ID() on big-endian (diff)
downloadlinux-4427f0c36e22e2cd6696b2fe7643e9756a14b3d3.tar.xz
linux-4427f0c36e22e2cd6696b2fe7643e9756a14b3d3.zip
repair bfs_write_inode(), switch bfs to simple_fsync()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--fs/bfs/inode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 3a9a1361fdc1..d1d9d9088371 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -98,14 +98,15 @@ error:
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);
@@ -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)