vserver 1.9.3
[linux-2.6.git] / fs / affs / inode.c
index f94afc0..3142f40 100644 (file)
@@ -181,7 +181,7 @@ bad_inode:
        return;
 }
 
-void
+int
 affs_write_inode(struct inode *inode, int unused)
 {
        struct super_block      *sb = inode->i_sb;
@@ -194,14 +194,14 @@ affs_write_inode(struct inode *inode, int unused)
 
        if (!inode->i_nlink)
                // possibly free block
-               return;
+               return 0;
        bh = affs_bread(sb, inode->i_ino);
        if (!bh) {
                affs_error(sb,"write_inode","Cannot read block %lu",inode->i_ino);
-               return;
+               return -EIO;
        }
        tail = AFFS_TAIL(sb, bh);
-       if (tail->stype == be32_to_cpu(ST_ROOT)) {
+       if (tail->stype == cpu_to_be32(ST_ROOT)) {
                secs_to_datestamp(inode->i_mtime.tv_sec,&AFFS_ROOT_TAIL(sb, bh)->root_change);
        } else {
                tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect);
@@ -226,6 +226,7 @@ affs_write_inode(struct inode *inode, int unused)
        mark_buffer_dirty_inode(bh, inode);
        affs_brelse(bh);
        affs_free_prealloc(inode);
+       return 0;
 }
 
 int
@@ -396,7 +397,7 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3
        AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino);
 
        if (inode_bh) {
-               u32 chain;
+               __be32 chain;
                chain = AFFS_TAIL(sb, inode_bh)->link_chain;
                AFFS_TAIL(sb, bh)->original = cpu_to_be32(inode->i_ino);
                AFFS_TAIL(sb, bh)->link_chain = chain;