Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / fs / qnx4 / inode.c
index aa92d6b..2ecd46f 100644 (file)
@@ -63,6 +63,7 @@ int qnx4_sync_inode(struct inode *inode)
 static void qnx4_delete_inode(struct inode *inode)
 {
        QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino));
+       truncate_inode_pages(&inode->i_data, 0);
        inode->i_size = 0;
        qnx4_truncate(inode);
        lock_kernel();
@@ -236,7 +237,7 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock )
        struct buffer_head *bh = NULL;
        struct qnx4_xblk *xblk = NULL;
        struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode);
-       qnx4_nxtnt_t nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
+       u16 nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
 
        if ( iblock < le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size) ) {
                // iblock is in the first extent. This is easy.
@@ -372,7 +373,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
                printk("qnx4: unable to read the superblock\n");
                goto outnobh;
        }
-       if ( le32_to_cpu( *(__u32*)bh->b_data ) != QNX4_SUPER_MAGIC ) {
+       if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) {
                if (!silent)
                        printk("qnx4: wrong fsid in superblock.\n");
                goto out;
@@ -545,7 +546,8 @@ static int init_inodecache(void)
 {
        qnx4_inode_cachep = kmem_cache_create("qnx4_inode_cache",
                                             sizeof(struct qnx4_inode_info),
-                                            0, SLAB_RECLAIM_ACCOUNT,
+                                            0, (SLAB_RECLAIM_ACCOUNT|
+                                               SLAB_MEM_SPREAD),
                                             init_once, NULL);
        if (qnx4_inode_cachep == NULL)
                return -ENOMEM;