Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / extN-2.4.18-ino_sb_fixup.patch
1 --- ./include/linux/ext3_fs.h.orig      Tue May  7 17:06:03 2002
2 +++ ./include/linux/ext3_fs.h   Tue May  7 17:07:11 2002
3 @@ -17,6 +17,8 @@
4  #define _LINUX_EXT3_FS_H
5  
6  #include <linux/types.h>
7 +#include <linux/ext3_fs_sb.h>
8 +#include <linux/ext3_fs_i.h>
9  
10  /*
11   * The second extended filesystem constants/structures
12 @@ -86,8 +88,8 @@
13  #define EXT3_MIN_BLOCK_LOG_SIZE                  10
14  
15  #ifdef __KERNEL__
16 -#define EXT3_SB(sb)    (&((sb)->u.ext3_sb))
17 -#define EXT3_I(inode)  (&((inode)->u.ext3_i))
18 +#define EXT3_SB(sb)    ((struct ext3_sb_info *)&((sb)->u.generic_sbp))
19 +#define EXT3_I(inode)  ((struct ext3_inode_info *)&((inode)->u.generic_ip))
20  
21  #define EXT3_BLOCK_SIZE(s)             ((s)->s_blocksize)
22  #define EXT3_BLOCK_SIZE_BITS(s)                ((s)->s_blocksize_bits)
23 @@ -447,7 +447,9 @@
24  #define NEXT_ORPHAN(inode) EXT3_I(inode)->i_dtime
25  static inline struct inode *orphan_list_entry(struct list_head *l)
26  {
27 -       return list_entry(l, struct inode, u.ext3_i.i_orphan);
28 +       return ((struct inode *)((char *)l -
29 +               (unsigned long)(offsetof(struct inode, u.generic_ip) +
30 +                               offsetof(struct ext3_inode_info, i_orphan))));
31  }
32  
33  /*