Contents of /trunk/kernel26-alx/patches-2.6.28-r1/0304-2.6.28-squashfs-3.4-build-fix.patch
Parent Directory | Revision Log
Revision 751 -
(show annotations)
(download)
Sun Jan 25 10:06:01 2009 UTC (15 years, 7 months ago) by niro
File size: 1050 byte(s)
Sun Jan 25 10:06:01 2009 UTC (15 years, 7 months ago) by niro
File size: 1050 byte(s)
-build-fix for 2.6.28, see http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg598003.html)
1 | The following commit to the upstream kernel (part of 2.6.28) removes |
2 | d_alloc_anon(), as a result squashfs-source fails to build against |
3 | kernel >=2.6.28. |
4 | |
5 | http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9308a6128d9074e348d9f9b5822546fe12a794a9 |
6 | |
7 | --- a/linux-2.6/inode.c |
8 | +++ b/linux-2.6/inode.c |
9 | @@ -639,12 +639,17 @@ static struct dentry *squashfs_export_ig |
10 | unsigned int inode_number) |
11 | { |
12 | squashfs_inode_t inode; |
13 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) |
14 | struct inode *i; |
15 | struct dentry *dentry; |
16 | +#else |
17 | + struct dentry *dentry = ERR_PTR(-ENOENT); |
18 | +#endif |
19 | |
20 | TRACE("Entered squashfs_export_iget\n"); |
21 | |
22 | inode = squashfs_inode_lookup(s, inode_number); |
23 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) |
24 | if(inode == SQUASHFS_INVALID_BLK) { |
25 | dentry = ERR_PTR(-ENOENT); |
26 | goto failure; |
27 | @@ -663,6 +668,10 @@ static struct dentry *squashfs_export_ig |
28 | } |
29 | |
30 | failure: |
31 | +#else |
32 | + if(inode != SQUASHFS_INVALID_BLK) |
33 | + dentry = d_obtain_alias(squashfs_iget(s, inode, inode_number)); |
34 | +#endif |
35 | return dentry; |
36 | } |