25 #include <linux/slab.h>
31 #include <asm/byteorder.h>
46 old_time = fs32_to_cpu(sbi, *sbi->
s_sb_time);
48 if (*sbi->
s_sb_state == cpu_to_fs32(sbi, 0x7c269d38 - old_time))
49 *sbi->
s_sb_state = cpu_to_fs32(sbi, 0x7c269d38 - time);
90 u64 id = huge_encode_dev(sb->
s_bdev->bd_dev);
108 unsigned char *
from,
unsigned char * to)
129 unsigned char * from,
unsigned char * to)
165 inode->
i_op = &sysv_symlink_inode_operations;
169 nd_terminate_link(SYSV_I(inode)->i_data, inode->
i_size,
170 sizeof(SYSV_I(inode)->i_data) - 1);
179 struct buffer_head * bh;
186 printk(
"Bad inode number on dev %s: %d is out of range\n",
188 return ERR_PTR(-
EIO);
199 printk(
"Major problem: unable to read inode from dev %s\n",
205 i_uid_write(inode, (
uid_t)fs16_to_cpu(sbi, raw_inode->
i_uid));
206 i_gid_write(inode, (
gid_t)fs16_to_cpu(sbi, raw_inode->
i_gid));
218 for (block = 0; block < 10+1+1+1; block++)
219 read3byte(sbi, &raw_inode->
i_data[3*block],
225 old_decode_dev(fs32_to_cpu(sbi, si->
i_data[0])));
233 return ERR_PTR(-
EIO);
236 static int __sysv_write_inode(
struct inode *
inode,
int wait)
240 struct buffer_head * bh;
248 printk(
"Bad inode number on dev %s: %d is out of range\n",
249 inode->
i_sb->s_id, ino);
254 printk(
"unable to read i-node block\n");
269 si->
i_data[0] = cpu_to_fs32(sbi, old_encode_dev(inode->
i_rdev));
270 for (block = 0; block < 10+1+1+1; block++)
271 write3byte(sbi, (
u8 *)&si->
i_data[block],
272 &raw_inode->
i_data[3*block]);
276 if (buffer_req(bh) && !buffer_uptodate(bh)) {
277 printk (
"IO error syncing sysv inode [%s:%08x]\n",
293 return __sysv_write_inode(inode, 1);
296 static void sysv_evict_inode(
struct inode *inode)
311 static struct inode *sysv_alloc_inode(
struct super_block *sb)
327 static void sysv_destroy_inode(
struct inode *inode)
332 static void init_once(
void *
p)
340 .alloc_inode = sysv_alloc_inode,
341 .destroy_inode = sysv_destroy_inode,
343 .evict_inode = sysv_evict_inode,
344 .put_super = sysv_put_super,
345 .sync_fs = sysv_sync_fs,
346 .remount_fs = sysv_remount,
347 .statfs = sysv_statfs,
356 if (!sysv_inode_cachep)