summaryrefslogtreecommitdiffstats
path: root/fs/minix/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-07 15:21:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:12 -0400
commit0d7916d7e985da52cdd2989c900485e17b035972 (patch)
treedfb4992f5150ece7ebb09754501e9e5981bb12ca /fs/minix/inode.c
parente1740a462ecb2eae213be15857b577cc6f6bb8b4 (diff)
switch minix to simple_fsync()
* get minix_write_inode() to honour the second argument * now we can use simple_fsync() for minixfs Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix/inode.c')
-rw-r--r--fs/minix/inode.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index 7eb53970f4b..f91a2369359 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -556,38 +556,25 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode)
return bh;
}
-static struct buffer_head *minix_update_inode(struct inode *inode)
-{
- if (INODE_VERSION(inode) == MINIX_V1)
- return V1_minix_update_inode(inode);
- else
- return V2_minix_update_inode(inode);
-}
-
-static int minix_write_inode(struct inode * inode, int wait)
-{
- brelse(minix_update_inode(inode));
- return 0;
-}
-
-int minix_sync_inode(struct inode * inode)
+static int minix_write_inode(struct inode *inode, int wait)
{
int err = 0;
struct buffer_head *bh;
- bh = minix_update_inode(inode);
- if (bh && buffer_dirty(bh))
- {
+ if (INODE_VERSION(inode) == MINIX_V1)
+ bh = V1_minix_update_inode(inode);
+ else
+ bh = V2_minix_update_inode(inode);
+ if (!bh)
+ return -EIO;
+ if (wait && buffer_dirty(bh)) {
sync_dirty_buffer(bh);
- if (buffer_req(bh) && !buffer_uptodate(bh))
- {
+ if (buffer_req(bh) && !buffer_uptodate(bh)) {
printk("IO error syncing minix inode [%s:%08lx]\n",
inode->i_sb->s_id, inode->i_ino);
- err = -1;
+ err = -EIO;
}
}
- else if (!bh)
- err = -1;
brelse (bh);
return err;
}