blob: 8f8870ab0ba2013742fab83f88f1799e9509dff9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
Index: super.c
===================================================================
RCS file: /home/cvs/unionfs/unionfs/super.c,v
retrieving revision 1.98
diff -u -p -r1.98 super.c
--- super.c 5 Aug 2006 01:28:46 -0000 1.98
+++ super.c 10 Aug 2006 01:01:10 -0000
@@ -684,18 +684,22 @@ enum {
static void do_decode(__u32 * fh, struct dentry **hidden_root,
ino_t * hidden_ino, ino_t * hidden_parent_ino)
{
- *hidden_root = (void *)fh[FhHRoot2];
+ unsigned long root;
+
+ root = fh[FhHRoot2];
*hidden_ino = fh[FhHIno2];
*hidden_parent_ino = fh[FhHPIno2];
#if BITS_PER_LONG == 64
- *hidden_root |= fh[FhHRoot1] << 32;
- *hidden_ino |= fh[FhHIno1] << 32;
- *hidden_parent_ino |= fh[FhHPIno1] << 32;
+ root |= ((unsigned long)fh[FhHRoot1]) << 32;
+ *hidden_ino |= ((unsigned long) fh[FhHIno1]) << 32;
+ *hidden_parent_ino |= ((unsigned long) fh[FhHPIno1]) << 32;
#elif BITS_PER_LONG == 32
/* ok */
#else
#error unknown size
#endif
+
+ *hidden_root = (struct dentry*) root;
}
static int unionfs_encode_fh(struct dentry *dentry, __u32 * fh, int *max_len,
@@ -739,11 +743,11 @@ static int unionfs_encode_fh(struct dent
unlock_dentry(sb->s_root);
h_ino = itohi_index(dentry->d_inode, bindex)->i_ino;
hp_ino = parent_ino(dtohd(dentry));
- fh[FhHRoot2] = (__u32) h_root;
+ fh[FhHRoot2] = (unsigned long) h_root;
fh[FhHIno2] = h_ino;
fh[FhHPIno2] = hp_ino;
#if BITS_PER_LONG == 64
- fh[FhHRoot1] = h_root >> 32;
+ fh[FhHRoot1] = ((unsigned long) h_root) >> 32;
fh[FhHIno1] = h_ino >> 32;
fh[FhHPIno1] = hp_ino >> 32;
#endif
|