1 typedef unsigned long long u64;
3 extern struct module __this_module;
5 unsigned long s_blocksize;
6 struct block_device *s_bdev;
8 struct file_system_type {
11 int (*get_sb) (struct file_system_type *, int, const char *, void *,
13 void (*kill_sb) (struct super_block *);
16 void kill_block_super(struct super_block *sb);
20 static inline __attribute__ ((always_inline))
21 struct buffer_head *sb_bread(struct super_block *sb, sector_t block)
23 return __bread(sb->s_bdev, block, sb->s_blocksize);
25 static int detect_sysv(struct sysv_sb_info *sbi, struct buffer_head *bh)
29 int (*test) (struct sysv_sb_info *, struct buffer_head *);
34 static int sysv_fill_super(struct super_block *sb, void *data, int silent)
36 struct buffer_head *bh1, *bh = ((void *)0);
37 unsigned long blocknr;
39 for (i = 0; i < (sizeof(flavours) / sizeof((flavours)[0]) + (sizeof(struct {
43 size = flavours[i].test(SYSV_SB(sb), bh);
47 blocknr = bh->b_blocknr >> 1;
48 bh1 = bh = sb_bread(sb, blocknr);
51 static int sysv_get_sb(struct file_system_type *fs_type, int flags,
52 const char *dev_name, void *data, struct vfsmount *mnt)
54 return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super,
57 static struct file_system_type sysv_fs_type = {
58 .owner = (&__this_module),.name = "sysv",.get_sb =
59 sysv_get_sb,.kill_sb = kill_block_super,.fs_flags = 1,
61 static int __attribute__ ((__section__(".init.text")))
62 __attribute__ ((__cold__))
63 __attribute__ ((no_instrument_function)) init_sysv_fs(void)
65 unregister:unregister_filesystem(&sysv_fs_type);
67 int init_module(void) __attribute__ ((alias("init_sysv_fs")));