aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bfs/inode.c')
-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:
98 return ERR_PTR(-EIO); 98 return ERR_PTR(-EIO);
99} 99}
100 100
101static int bfs_write_inode(struct inode *inode, int unused) 101static int bfs_write_inode(struct inode *inode, int wait)
102{ 102{
103 struct bfs_sb_info *info = BFS_SB(inode->i_sb);
103 unsigned int ino = (u16)inode->i_ino; 104 unsigned int ino = (u16)inode->i_ino;
104 unsigned long i_sblock; 105 unsigned long i_sblock;
105 struct bfs_inode *di; 106 struct bfs_inode *di;
106 struct buffer_head *bh; 107 struct buffer_head *bh;
107 int block, off; 108 int block, off;
108 struct bfs_sb_info *info = BFS_SB(inode->i_sb); 109 int err = 0;
109 110
110 dprintf("ino=%08x\n", ino); 111 dprintf("ino=%08x\n", ino);
111 112
@@ -146,9 +147,14 @@ static int bfs_write_inode(struct inode *inode, int unused)
146 di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1); 147 di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1);
147 148
148 mark_buffer_dirty(bh); 149 mark_buffer_dirty(bh);
150 if (wait) {
151 sync_dirty_buffer(bh);
152 if (buffer_req(bh) && !buffer_uptodate(bh))
153 err = -EIO;
154 }
149 brelse(bh); 155 brelse(bh);
150 mutex_unlock(&info->bfs_lock); 156 mutex_unlock(&info->bfs_lock);
151 return 0; 157 return err;
152} 158}
153 159
154static void bfs_delete_inode(struct inode *inode) 160static void bfs_delete_inode(struct inode *inode)