summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--0001-Linux-3.13-Check-return-value-from-bdi_init.patch2
-rw-r--r--0002-Linux-4.5-no-highmem-in-symlink-ops.patch2
-rw-r--r--0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch2
-rw-r--r--0004-Linux-4.5-don-t-access-i_mutex-directly.patch (renamed from 0005-Linux-4.5-don-t-access-i_mutex-directly.patch)8
-rw-r--r--0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch296
-rw-r--r--PKGBUILD19
7 files changed, 324 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 28d38f82d13d..ade4b1502ca1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu May 12 05:54:25 UTC 2016
+# Thu Jun 9 19:52:01 UTC 2016
pkgbase = openafs-modules-dkms
pkgdesc = Kernel module for OpenAFS (dkms)
pkgver = 1.6.18
- pkgrel = 2
+ pkgrel = 3
url = http://www.openafs.org
arch = i686
arch = x86_64
@@ -21,13 +21,15 @@ pkgbase = openafs-modules-dkms
source = 0001-Linux-3.13-Check-return-value-from-bdi_init.patch
source = 0002-Linux-4.5-no-highmem-in-symlink-ops.patch
source = 0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
- source = 0005-Linux-4.5-don-t-access-i_mutex-directly.patch
+ source = 0004-Linux-4.5-don-t-access-i_mutex-directly.patch
+ source = 0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch
sha256sums = b3c35e7be6b6c86b91e7c699fd015f53c87bc19d1ae8ec3ec9cda6b97327d3b6
sha256sums = ea7d1e6dfb5006016e25738be722c8793765f52ad55c0bbf588dd7fdf2bdd2bf
- sha256sums = bec998ce038349025fe030c692f7f0fe46bbe8922433cf6be6298aac536f34cf
- sha256sums = d18b1278c097825801fa1c721cae861f985d9da5460475b74cefe1eb789a1f92
- sha256sums = 6336dde35c68c74ae9427b312f170481616d8d347ec4ddfa2966a683797361b0
- sha256sums = e3f369f000df13a4d207c1533d63ffa0b139c3d374294f6d1fbc77f5e5b9b4df
+ sha256sums = abac60b5ae85a8d9311a13f35d723c63de2049033058736db7b3ef39439c2811
+ sha256sums = 0ae7f199e5e4031beef55c93087c34505701ef8f41fce4c255239bb8b48e9888
+ sha256sums = c7403d943f4bd5bb61e47b79c8d5c1258ced77800b2c20a603a4676ae9ee6f8c
+ sha256sums = 88d7ab67b730eeeaef991cb0db8dabf12d1773a922fbba5c6ac99731a6e87fea
+ sha256sums = 76d83389674da6fcb3ce0635308cd47a949f13361cd29ae2c513847fa5dced1f
pkgname = openafs-modules-dkms
diff --git a/0001-Linux-3.13-Check-return-value-from-bdi_init.patch b/0001-Linux-3.13-Check-return-value-from-bdi_init.patch
index b0fb3cf90a39..ee1f6ec81407 100644
--- a/0001-Linux-3.13-Check-return-value-from-bdi_init.patch
+++ b/0001-Linux-3.13-Check-return-value-from-bdi_init.patch
@@ -62,5 +62,5 @@ index 3936d4d..c222668 100644
kfree(afs_backing_dev_info);
module_put(THIS_MODULE);
--
-2.8.2
+2.8.3
diff --git a/0002-Linux-4.5-no-highmem-in-symlink-ops.patch b/0002-Linux-4.5-no-highmem-in-symlink-ops.patch
index 7e42d62ef064..e3f3cf6d2025 100644
--- a/0002-Linux-4.5-no-highmem-in-symlink-ops.patch
+++ b/0002-Linux-4.5-no-highmem-in-symlink-ops.patch
@@ -41,5 +41,5 @@ index 1b99c94..2f753dd 100644
ip->i_data.a_ops = &afs_symlink_aops;
ip->i_mapping = &ip->i_data;
--
-2.8.2
+2.8.3
diff --git a/0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch b/0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
index 15be91bebe8a..cf8f4b88ecfa 100644
--- a/0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
+++ b/0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
@@ -76,5 +76,5 @@ index 2f753dd..00b41ef 100644
# else
.follow_link = page_follow_link_light,
--
-2.8.2
+2.8.3
diff --git a/0005-Linux-4.5-don-t-access-i_mutex-directly.patch b/0004-Linux-4.5-don-t-access-i_mutex-directly.patch
index db2a7dafb4a7..906ba54a9b4d 100644
--- a/0005-Linux-4.5-don-t-access-i_mutex-directly.patch
+++ b/0004-Linux-4.5-don-t-access-i_mutex-directly.patch
@@ -1,7 +1,7 @@
-From 68494a4bfe01cc70c7c3efb0640e46ce62fcf8f9 Mon Sep 17 00:00:00 2001
+From 60b36c98188a786f1ba71f0e2b0a1b8f7ff0ba2c Mon Sep 17 00:00:00 2001
From: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun, 1 May 2016 19:48:40 -0400
-Subject: [PATCH 5/5] Linux 4.5: don't access i_mutex directly
+Subject: [PATCH 4/5] Linux 4.5: don't access i_mutex directly
Linux commit 5955102c, in preparation for future work, introduced
wrapper functions to lock/unlock inode mutexes. This is to
@@ -64,7 +64,7 @@ index 4d484c1..5268e7e 100644
#else
up(&ip->i_sem);
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
-index 532c9e9..dca4413 100644
+index 00b41ef..2696b48 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -571,13 +571,13 @@ afs_linux_fsync(struct file *fp, int datasync)
@@ -84,5 +84,5 @@ index 532c9e9..dca4413 100644
crfree(credp);
return afs_convert_code(code);
--
-2.8.2
+2.8.3
diff --git a/0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch b/0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch
new file mode 100644
index 000000000000..fe9657df2a27
--- /dev/null
+++ b/0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch
@@ -0,0 +1,296 @@
+From b9af471c9ffa2cd8b537c4f391f5b198d7812599 Mon Sep 17 00:00:00 2001
+From: Joe Gorse <jhgorse@gmail.com>
+Date: Thu, 9 Jun 2016 14:11:23 -0400
+Subject: [PATCH 5/5] Linux 4.6: rm PAGE_CACHE_* and page_cache_{get,release}
+ macros
+
+This is an automatic patch generated by Coccinelle (spatch) from:
+https://github.com/torvalds/linux/commit/09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a
+
+The spatch used:
+@@
+expression E;
+@@
+- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
++ E
+
+@@
+expression E;
+@@
+- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
++ E
+
+@@
+@@
+- PAGE_CACHE_SHIFT
++ PAGE_SHIFT
+
+@@
+@@
+- PAGE_CACHE_SIZE
++ PAGE_SIZE
+
+@@
+@@
+- PAGE_CACHE_MASK
++ PAGE_MASK
+
+@@
+expression E;
+@@
+- PAGE_CACHE_ALIGN(E)
++ PAGE_ALIGN(E)
+
+@@
+expression E;
+@@
+- page_cache_get(E)
++ get_page(E)
+
+@@
+expression E;
+@@
+- page_cache_release(E)
++ put_page(E)
+
+Change-Id: Iabe29b1349ab44282c66c86eced9e5b2056c9efb
+---
+ src/afs/LINUX/osi_compat.h | 2 +-
+ src/afs/LINUX/osi_pagecopy.c | 12 ++++++------
+ src/afs/LINUX/osi_vnodeops.c | 42 +++++++++++++++++++++---------------------
+ 3 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
+index 5268e7e..0596273 100644
+--- a/src/afs/LINUX/osi_compat.h
++++ b/src/afs/LINUX/osi_compat.h
+@@ -274,7 +274,7 @@ afs_linux_cred_is_current(afs_ucred_t *cred)
+ static inline loff_t
+ page_offset(struct page *pp)
+ {
+- return (((loff_t) pp->index) << PAGE_CACHE_SHIFT);
++ return (((loff_t) pp->index) << PAGE_SHIFT);
+ }
+ #endif
+
+diff --git a/src/afs/LINUX/osi_pagecopy.c b/src/afs/LINUX/osi_pagecopy.c
+index 4829832..7142a1b 100644
+--- a/src/afs/LINUX/osi_pagecopy.c
++++ b/src/afs/LINUX/osi_pagecopy.c
+@@ -116,9 +116,9 @@ void afs_pagecopy_queue_page(struct afs_pagecopy_task *task,
+ page = kzalloc(sizeof(struct afs_pagecopy_page), GFP_NOFS);
+ INIT_LIST_HEAD(&page->tasklink);
+
+- page_cache_get(cachepage);
++ get_page(cachepage);
+ page->cachepage = cachepage;
+- page_cache_get(afspage);
++ get_page(afspage);
+ page->afspage = afspage;
+
+ spin_lock(&task->lock);
+@@ -159,7 +159,7 @@ static struct page * afs_pagecopy_checkworkload(void) {
+ if (!schedule_work(&task->work))
+ atomic_dec(&task->refcnt);
+ } else if (!sleeppage) {
+- page_cache_get(page->cachepage);
++ get_page(page->cachepage);
+ sleeppage = page->cachepage;
+ }
+ }
+@@ -205,8 +205,8 @@ static void afs_pagecopy_worker(struct work_struct *work)
+ SetPageUptodate(page->afspage);
+ }
+ unlock_page(page->afspage);
+- page_cache_release(page->cachepage);
+- page_cache_release(page->afspage);
++ put_page(page->cachepage);
++ put_page(page->afspage);
+ kfree(page);
+
+ spin_lock(&task->lock);
+@@ -224,7 +224,7 @@ static int afs_pagecopy_thread(void *unused) {
+ sleeppage = afs_pagecopy_checkworkload();
+ if (sleeppage) {
+ wait_on_page_locked(sleeppage);
+- page_cache_release(sleeppage);
++ put_page(sleeppage);
+ } else {
+ break;
+ }
+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
+index 2696b48..86a9668 100644
+--- a/src/afs/LINUX/osi_vnodeops.c
++++ b/src/afs/LINUX/osi_vnodeops.c
+@@ -1984,7 +1984,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
+ /* If we're trying to read a page that's past the end of the disk
+ * cache file, then just return a zeroed page */
+ if (AFS_CHUNKOFFSET(offset) >= i_size_read(cacheinode)) {
+- zero_user_segment(page, 0, PAGE_CACHE_SIZE);
++ zero_user_segment(page, 0, PAGE_SIZE);
+ SetPageUptodate(page);
+ if (task)
+ unlock_page(page);
+@@ -1993,7 +1993,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
+
+ /* From our offset, we now need to work out which page in the disk
+ * file it corresponds to. This will be fun ... */
+- pageindex = (offset - AFS_CHUNKTOBASE(chunk)) >> PAGE_CACHE_SHIFT;
++ pageindex = (offset - AFS_CHUNKTOBASE(chunk)) >> PAGE_SHIFT;
+
+ while (cachepage == NULL) {
+ cachepage = find_get_page(cachemapping, pageindex);
+@@ -2011,12 +2011,12 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
+ cachepage = newpage;
+ newpage = NULL;
+
+- page_cache_get(cachepage);
++ get_page(cachepage);
+ if (!pagevec_add(lrupv, cachepage))
+ __pagevec_lru_add_file(lrupv);
+
+ } else {
+- page_cache_release(newpage);
++ put_page(newpage);
+ newpage = NULL;
+ if (code != -EEXIST)
+ goto out;
+@@ -2057,7 +2057,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
+
+ out:
+ if (cachepage)
+- page_cache_release(cachepage);
++ put_page(cachepage);
+
+ return code;
+ }
+@@ -2328,7 +2328,7 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping,
+ /* If we allocate a page and don't remove it from page_list,
+ * the page cache gets upset. */
+ list_del(&pp->lru);
+- isize = (i_size_read(fp->f_mapping->host) - 1) >> PAGE_CACHE_SHIFT;
++ isize = (i_size_read(fp->f_mapping->host) - 1) >> PAGE_SHIFT;
+ if(pp->index > isize) {
+ if(PageLocked(pp))
+ unlock_page(pp);
+@@ -2345,7 +2345,7 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping,
+ if(base_index != pp->index) {
+ if(PageLocked(pp))
+ unlock_page(pp);
+- page_cache_release(pp);
++ put_page(pp);
+ iovecp[page_ix].iov_base = (void *) 0;
+ base_index++;
+ ancr->length -= PAGE_SIZE;
+@@ -2355,7 +2355,7 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping,
+ if(code) {
+ if(PageLocked(pp))
+ unlock_page(pp);
+- page_cache_release(pp);
++ put_page(pp);
+ iovecp[page_ix].iov_base = (void *) 0;
+ } else {
+ page_count++;
+@@ -2415,7 +2415,7 @@ afs_linux_bypass_readpage(struct file *fp, struct page *pp)
+ * it as up to date.
+ */
+ if (page_offset(pp) >= i_size_read(fp->f_mapping->host)) {
+- zero_user_segment(pp, 0, PAGE_CACHE_SIZE);
++ zero_user_segment(pp, 0, PAGE_SIZE);
+ SetPageUptodate(pp);
+ unlock_page(pp);
+ return 0;
+@@ -2576,13 +2576,13 @@ afs_linux_readpages(struct file *fp, struct address_space *mapping,
+
+ if (tdc && !add_to_page_cache(page, mapping, page->index,
+ GFP_KERNEL)) {
+- page_cache_get(page);
++ get_page(page);
+ if (!pagevec_add(&lrupv, page))
+ __pagevec_lru_add_file(&lrupv);
+
+ afs_linux_read_cache(cacheFp, page, tdc->f.chunk, &lrupv, task);
+ }
+- page_cache_release(page);
++ put_page(page);
+ }
+ if (pagevec_count(&lrupv))
+ __pagevec_lru_add_file(&lrupv);
+@@ -2763,7 +2763,7 @@ afs_linux_writepage(struct page *pp)
+ struct inode *inode;
+ struct vcache *vcp;
+ cred_t *credp;
+- unsigned int to = PAGE_CACHE_SIZE;
++ unsigned int to = PAGE_SIZE;
+ loff_t isize;
+ int code = 0;
+ int code1 = 0;
+@@ -2773,7 +2773,7 @@ afs_linux_writepage(struct page *pp)
+ /* XXX - Do we need to redirty the page here? */
+ }
+
+- page_cache_get(pp);
++ get_page(pp);
+
+ inode = mapping->host;
+ vcp = VTOAFS(inode);
+@@ -2842,7 +2842,7 @@ afs_linux_writepage(struct page *pp)
+
+ done:
+ end_page_writeback(pp);
+- page_cache_release(pp);
++ put_page(pp);
+
+ if (code1)
+ return code1;
+@@ -2931,10 +2931,10 @@ afs_linux_prepare_write(struct file *file, struct page *page, unsigned from,
+ /* Is the location we are writing to beyond the end of the file? */
+ if (pagebase >= isize ||
+ ((from == 0) && (pagebase + to) >= isize)) {
+- zero_user_segments(page, 0, from, to, PAGE_CACHE_SIZE);
++ zero_user_segments(page, 0, from, to, PAGE_SIZE);
+ SetPageChecked(page);
+ /* Are we we writing a full page */
+- } else if (from == 0 && to == PAGE_CACHE_SIZE) {
++ } else if (from == 0 && to == PAGE_SIZE) {
+ SetPageChecked(page);
+ /* Is the page readable, if it's wronly, we don't care, because we're
+ * not actually going to read from it ... */
+@@ -2955,12 +2955,12 @@ afs_linux_write_end(struct file *file, struct address_space *mapping,
+ struct page *page, void *fsdata)
+ {
+ int code;
+- unsigned int from = pos & (PAGE_CACHE_SIZE - 1);
++ unsigned int from = pos & (PAGE_SIZE - 1);
+
+ code = afs_linux_commit_write(file, page, from, from + len);
+
+ unlock_page(page);
+- page_cache_release(page);
++ put_page(page);
+ return code;
+ }
+
+@@ -2970,8 +2970,8 @@ afs_linux_write_begin(struct file *file, struct address_space *mapping,
+ struct page **pagep, void **fsdata)
+ {
+ struct page *page;
+- pgoff_t index = pos >> PAGE_CACHE_SHIFT;
+- unsigned int from = pos & (PAGE_CACHE_SIZE - 1);
++ pgoff_t index = pos >> PAGE_SHIFT;
++ unsigned int from = pos & (PAGE_SIZE - 1);
+ int code;
+
+ page = grab_cache_page_write_begin(mapping, index, flags);
+@@ -2980,7 +2980,7 @@ afs_linux_write_begin(struct file *file, struct address_space *mapping,
+ code = afs_linux_prepare_write(file, page, from, from + len);
+ if (code) {
+ unlock_page(page);
+- page_cache_release(page);
++ put_page(page);
+ }
+
+ return code;
+--
+2.8.3
+
diff --git a/PKGBUILD b/PKGBUILD
index 7870ecdce013..4bae7a73a5f5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=openafs-modules-dkms
_srcname=openafs
pkgver=1.6.18
-pkgrel=2
+pkgrel=3
pkgdesc="Kernel module for OpenAFS (dkms)"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.openafs.org"
@@ -20,13 +20,15 @@ source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2
0001-Linux-3.13-Check-return-value-from-bdi_init.patch
0002-Linux-4.5-no-highmem-in-symlink-ops.patch
0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
- 0005-Linux-4.5-don-t-access-i_mutex-directly.patch)
+ 0004-Linux-4.5-don-t-access-i_mutex-directly.patch
+ 0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch)
sha256sums=('b3c35e7be6b6c86b91e7c699fd015f53c87bc19d1ae8ec3ec9cda6b97327d3b6'
'ea7d1e6dfb5006016e25738be722c8793765f52ad55c0bbf588dd7fdf2bdd2bf'
- 'bec998ce038349025fe030c692f7f0fe46bbe8922433cf6be6298aac536f34cf'
- 'd18b1278c097825801fa1c721cae861f985d9da5460475b74cefe1eb789a1f92'
- '6336dde35c68c74ae9427b312f170481616d8d347ec4ddfa2966a683797361b0'
- 'e3f369f000df13a4d207c1533d63ffa0b139c3d374294f6d1fbc77f5e5b9b4df')
+ 'abac60b5ae85a8d9311a13f35d723c63de2049033058736db7b3ef39439c2811'
+ '0ae7f199e5e4031beef55c93087c34505701ef8f41fce4c255239bb8b48e9888'
+ 'c7403d943f4bd5bb61e47b79c8d5c1258ced77800b2c20a603a4676ae9ee6f8c'
+ '88d7ab67b730eeeaef991cb0db8dabf12d1773a922fbba5c6ac99731a6e87fea'
+ '76d83389674da6fcb3ce0635308cd47a949f13361cd29ae2c513847fa5dced1f')
prepare() {
cd ${srcdir}/${_srcname}-${pkgver}
@@ -35,7 +37,10 @@ prepare() {
patch -p1 < ${srcdir}/0001-Linux-3.13-Check-return-value-from-bdi_init.patch
patch -p1 < ${srcdir}/0002-Linux-4.5-no-highmem-in-symlink-ops.patch
patch -p1 < ${srcdir}/0003-Linux-4.5-get_link-instead-of-follow_link-put_link.patch
- patch -p1 < ${srcdir}/0005-Linux-4.5-don-t-access-i_mutex-directly.patch
+ patch -p1 < ${srcdir}/0004-Linux-4.5-don-t-access-i_mutex-directly.patch
+
+ # Patch required to build against Linux 4.6
+ patch -p1 < ${srcdir}/0005-Linux-4.6-rm-PAGE_CACHE_-and-page_cache_-get-release.patch
# Only needed when changes to configure were made
./regen.sh -q