return;
}
-void
+int
affs_write_inode(struct inode *inode, int unused)
{
struct super_block *sb = inode->i_sb;
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);
mark_buffer_dirty_inode(bh, inode);
affs_brelse(bh);
affs_free_prealloc(inode);
+ return 0;
}
int
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;