diff options
author | John Crispin <blogic@openwrt.org> | 2012-07-24 23:07:35 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-07-24 23:07:35 +0000 |
commit | 38dbac6005ccb9c594846c6f9e397fae2a144fa1 (patch) | |
tree | e415e0b6ccb62daabdba5c71611fac95ecd6f6d3 /package/compcache/patches | |
parent | e4bf8e56a9d1c1295fa557574e44df360374c60e (diff) | |
download | master-187ad058-38dbac6005ccb9c594846c6f9e397fae2a144fa1.tar.gz master-187ad058-38dbac6005ccb9c594846c6f9e397fae2a144fa1.tar.bz2 master-187ad058-38dbac6005ccb9c594846c6f9e397fae2a144fa1.zip |
[compcache] fixes build for 3.x kernel and remove old 2.6.x references
Signed-off-by: christoph.thielecke@gmx.de
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32832 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/compcache/patches')
-rw-r--r-- | package/compcache/patches/003-kernel-3.x-compat.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/package/compcache/patches/003-kernel-3.x-compat.patch b/package/compcache/patches/003-kernel-3.x-compat.patch new file mode 100644 index 0000000000..70996ebe71 --- /dev/null +++ b/package/compcache/patches/003-kernel-3.x-compat.patch @@ -0,0 +1,31 @@ +Index: compcache-0.6.2/ramzswap_drv.c +=================================================================== +--- compcache-0.6.2.orig/ramzswap_drv.c 2012-07-25 01:02:39.000000000 +0200 ++++ compcache-0.6.2/ramzswap_drv.c 2012-07-25 01:04:29.270750850 +0200 +@@ -525,7 +525,7 @@ + + if (S_ISBLK(inode->i_mode)) { + bdev = I_BDEV(inode); +- ret = bd_claim(bdev, setup_backing_swap); ++ ret = blkdev_get(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, setup_backing_swap); + if (ret < 0) { + bdev = NULL; + goto bad_param; +@@ -557,7 +557,7 @@ + + bad_param: + if (bdev) +- bd_release(bdev); ++ blkdev_put(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL); + filp_close(swap_file, NULL); + + out: +@@ -1097,7 +1097,7 @@ + /* Close backing swap device, if present */ + if (rzs->backing_swap) { + if (is_backing_blkdev) +- bd_release(rzs->backing_swap); ++ blkdev_put(rzs->backing_swap, FMODE_READ | FMODE_WRITE | FMODE_EXCL); + filp_close(rzs->swap_file, NULL); + rzs->backing_swap = NULL; + memset(rzs->backing_swap_name, 0, MAX_SWAP_NAME_LEN); |