diff options
Diffstat (limited to 'fs/qnx4/inode.c')
-rw-r--r-- | fs/qnx4/inode.c | 58 |
1 files changed, 15 insertions, 43 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index fe1f0f31d11c..681df5fcd161 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -13,19 +13,15 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/types.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/errno.h> | ||
19 | #include <linux/slab.h> | ||
20 | #include <linux/fs.h> | ||
21 | #include <linux/qnx4_fs.h> | ||
22 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
23 | #include <linux/highuid.h> | 18 | #include <linux/highuid.h> |
24 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
25 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
26 | #include <linux/buffer_head.h> | 21 | #include <linux/buffer_head.h> |
27 | #include <linux/vfs.h> | 22 | #include <linux/writeback.h> |
28 | #include <asm/uaccess.h> | 23 | #include <linux/statfs.h> |
24 | #include "qnx4.h" | ||
29 | 25 | ||
30 | #define QNX4_VERSION 4 | 26 | #define QNX4_VERSION 4 |
31 | #define QNX4_BMNAME ".bitmap" | 27 | #define QNX4_BMNAME ".bitmap" |
@@ -34,31 +30,6 @@ static const struct super_operations qnx4_sops; | |||
34 | 30 | ||
35 | #ifdef CONFIG_QNX4FS_RW | 31 | #ifdef CONFIG_QNX4FS_RW |
36 | 32 | ||
37 | int 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 | |||
62 | static void qnx4_delete_inode(struct inode *inode) | 33 | static void qnx4_delete_inode(struct inode *inode) |
63 | { | 34 | { |
64 | QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino)); | 35 | QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino)); |
@@ -70,15 +41,7 @@ static void qnx4_delete_inode(struct inode *inode) | |||
70 | unlock_kernel(); | 41 | unlock_kernel(); |
71 | } | 42 | } |
72 | 43 | ||
73 | static void qnx4_write_super(struct super_block *sb) | 44 | static int qnx4_write_inode(struct inode *inode, int do_sync) |
74 | { | ||
75 | lock_kernel(); | ||
76 | QNX4DEBUG(("qnx4: write_super\n")); | ||
77 | sb->s_dirt = 0; | ||
78 | unlock_kernel(); | ||
79 | } | ||
80 | |||
81 | static int qnx4_write_inode(struct inode *inode, int unused) | ||
82 | { | 45 | { |
83 | struct qnx4_inode_entry *raw_inode; | 46 | struct qnx4_inode_entry *raw_inode; |
84 | int block, ino; | 47 | int block, ino; |
@@ -115,6 +78,16 @@ static int qnx4_write_inode(struct inode *inode, int unused) | |||
115 | raw_inode->di_ctime = cpu_to_le32(inode->i_ctime.tv_sec); | 78 | raw_inode->di_ctime = cpu_to_le32(inode->i_ctime.tv_sec); |
116 | raw_inode->di_first_xtnt.xtnt_size = cpu_to_le32(inode->i_blocks); | 79 | raw_inode->di_first_xtnt.xtnt_size = cpu_to_le32(inode->i_blocks); |
117 | mark_buffer_dirty(bh); | 80 | mark_buffer_dirty(bh); |
81 | if (do_sync) { | ||
82 | sync_dirty_buffer(bh); | ||
83 | if (buffer_req(bh) && !buffer_uptodate(bh)) { | ||
84 | printk("qnx4: IO error syncing inode [%s:%08x]\n", | ||
85 | inode->i_sb->s_id, ino); | ||
86 | brelse(bh); | ||
87 | unlock_kernel(); | ||
88 | return -EIO; | ||
89 | } | ||
90 | } | ||
118 | brelse(bh); | 91 | brelse(bh); |
119 | unlock_kernel(); | 92 | unlock_kernel(); |
120 | return 0; | 93 | return 0; |
@@ -138,7 +111,6 @@ static const struct super_operations qnx4_sops = | |||
138 | #ifdef CONFIG_QNX4FS_RW | 111 | #ifdef CONFIG_QNX4FS_RW |
139 | .write_inode = qnx4_write_inode, | 112 | .write_inode = qnx4_write_inode, |
140 | .delete_inode = qnx4_delete_inode, | 113 | .delete_inode = qnx4_delete_inode, |
141 | .write_super = qnx4_write_super, | ||
142 | #endif | 114 | #endif |
143 | }; | 115 | }; |
144 | 116 | ||