All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] backports: add page_ref backport
@ 2016-05-31 14:03 Johannes Berg
  2016-06-04 20:23 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2016-05-31 14:03 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Currently, only page_ref_inc() is needed, so backport only that.

Change-Id: I7b4d7eb4ccccf61d0921ef28a40b6628e8f2c1f8
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/mm.h       |  1 +
 backport/backport-include/linux/page_ref.h | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 backport/backport-include/linux/page_ref.h

diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h
index bac230364139..5b3cca6afb63 100644
--- a/backport/backport-include/linux/mm.h
+++ b/backport/backport-include/linux/mm.h
@@ -1,6 +1,7 @@
 #ifndef __BACKPORT_MM_H
 #define __BACKPORT_MM_H
 #include_next <linux/mm.h>
+#include <linux/page_ref.h>
 
 #ifndef VM_NODUMP
 /*
diff --git a/backport/backport-include/linux/page_ref.h b/backport/backport-include/linux/page_ref.h
new file mode 100644
index 000000000000..0b890e9be415
--- /dev/null
+++ b/backport/backport-include/linux/page_ref.h
@@ -0,0 +1,13 @@
+#ifndef __BP_PAGE_REF_H
+#define __BP_PAGE_REF_H
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+#include_next <linux/page_ref.h>
+#else
+static inline void page_ref_inc(struct page *page)
+{
+	atomic_inc(&page->_count);
+}
+#endif
+
+#endif /* __BP_PAGE_REF_H */
-- 
2.8.0.rc3

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] backports: add page_ref backport
  2016-05-31 14:03 [PATCH] backports: add page_ref backport Johannes Berg
@ 2016-06-04 20:23 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2016-06-04 20:23 UTC (permalink / raw)
  To: Johannes Berg, backports; +Cc: Johannes Berg



On 31-05-16 16:03, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Currently, only page_ref_inc() is needed, so backport only that.
> 
> Change-Id: I7b4d7eb4ccccf61d0921ef28a40b6628e8f2c1f8

Guess the change-id is internal ;-) The patch works for me.

Regards,
Arend

> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  backport/backport-include/linux/mm.h       |  1 +
>  backport/backport-include/linux/page_ref.h | 13 +++++++++++++
>  2 files changed, 14 insertions(+)
>  create mode 100644 backport/backport-include/linux/page_ref.h
> 
> diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h
> index bac230364139..5b3cca6afb63 100644
> --- a/backport/backport-include/linux/mm.h
> +++ b/backport/backport-include/linux/mm.h
> @@ -1,6 +1,7 @@
>  #ifndef __BACKPORT_MM_H
>  #define __BACKPORT_MM_H
>  #include_next <linux/mm.h>
> +#include <linux/page_ref.h>
>  
>  #ifndef VM_NODUMP
>  /*
> diff --git a/backport/backport-include/linux/page_ref.h b/backport/backport-include/linux/page_ref.h
> new file mode 100644
> index 000000000000..0b890e9be415
> --- /dev/null
> +++ b/backport/backport-include/linux/page_ref.h
> @@ -0,0 +1,13 @@
> +#ifndef __BP_PAGE_REF_H
> +#define __BP_PAGE_REF_H
> +#include <linux/version.h>
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
> +#include_next <linux/page_ref.h>
> +#else
> +static inline void page_ref_inc(struct page *page)
> +{
> +	atomic_inc(&page->_count);
> +}
> +#endif
> +
> +#endif /* __BP_PAGE_REF_H */
> 
--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-04 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 14:03 [PATCH] backports: add page_ref backport Johannes Berg
2016-06-04 20:23 ` Arend van Spriel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.