aboutsummaryrefslogtreecommitdiffstats
path: root/fs/qnx4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/qnx4/inode.c')
-rw-r--r--fs/qnx4/inode.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 95c12fc613f1..40712867b8a8 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -24,6 +24,7 @@
24#include <linux/smp_lock.h> 24#include <linux/smp_lock.h>
25#include <linux/pagemap.h> 25#include <linux/pagemap.h>
26#include <linux/buffer_head.h> 26#include <linux/buffer_head.h>
27#include <linux/writeback.h>
27#include <linux/vfs.h> 28#include <linux/vfs.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
29 30
@@ -34,31 +35,6 @@ static const struct super_operations qnx4_sops;
34 35
35#ifdef CONFIG_QNX4FS_RW 36#ifdef CONFIG_QNX4FS_RW
36 37
37int qnx4_sync_inode(struct inode *inode)
38{
39 int err = 0;
40# if 0
41 struct buffer_head *bh;
42
43 bh = qnx4_update_inode(inode);
44 if (bh && buffer_dirty(bh))
45 {
46 sync_dirty_buffer(bh);
47 if (buffer_req(bh) && !buffer_uptodate(bh))
48 {
49 printk ("IO error syncing qnx4 inode [%s:%08lx]\n",
50 inode->i_sb->s_id, inode->i_ino);
51 err = -1;
52 }
53 brelse (bh);
54 } else if (!bh) {
55 err = -1;
56 }
57# endif
58
59 return err;
60}
61
62static void qnx4_delete_inode(struct inode *inode) 38static void qnx4_delete_inode(struct inode *inode)
63{ 39{
64 QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino)); 40 QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino));
@@ -70,7 +46,7 @@ static void qnx4_delete_inode(struct inode *inode)
70 unlock_kernel(); 46 unlock_kernel();
71} 47}
72 48
73static int qnx4_write_inode(struct inode *inode, int unused) 49static int qnx4_write_inode(struct inode *inode, int do_sync)
74{ 50{
75 struct qnx4_inode_entry *raw_inode; 51 struct qnx4_inode_entry *raw_inode;
76 int block, ino; 52 int block, ino;
@@ -107,6 +83,16 @@ static int qnx4_write_inode(struct inode *inode, int unused)
107 raw_inode->di_ctime = cpu_to_le32(inode->i_ctime.tv_sec); 83 raw_inode->di_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
108 raw_inode->di_first_xtnt.xtnt_size = cpu_to_le32(inode->i_blocks); 84 raw_inode->di_first_xtnt.xtnt_size = cpu_to_le32(inode->i_blocks);
109 mark_buffer_dirty(bh); 85 mark_buffer_dirty(bh);
86 if (do_sync) {
87 sync_dirty_buffer(bh);
88 if (buffer_req(bh) && !buffer_uptodate(bh)) {
89 printk("qnx4: IO error syncing inode [%s:%08x]\n",
90 inode->i_sb->s_id, ino);
91 brelse(bh);
92 unlock_kernel();
93 return -EIO;
94 }
95 }
110 brelse(bh); 96 brelse(bh);
111 unlock_kernel(); 97 unlock_kernel();
112 return 0; 98 return 0;