2008-03-17 19:20:32

by Miklos Szeredi

[permalink] [raw]
Subject: [patch 1/8] mm: bdi: export bdi_writeout_inc()

From: Miklos Szeredi <[email protected]>

Fuse needs this for writable mmap support.

Signed-off-by: Miklos Szeredi <[email protected]>
---
include/linux/backing-dev.h | 2 ++
mm/page-writeback.c | 10 ++++++++++
2 files changed, 12 insertions(+)

Index: linux/include/linux/backing-dev.h
===================================================================
--- linux.orig/include/linux/backing-dev.h 2008-03-17 18:24:13.000000000 +0100
+++ linux/include/linux/backing-dev.h 2008-03-17 18:24:36.000000000 +0100
@@ -134,6 +134,8 @@ static inline s64 bdi_stat_sum(struct ba
return sum;
}

+extern void bdi_writeout_inc(struct backing_dev_info *bdi);
+
/*
* maximal error of a stat counter.
*/
Index: linux/mm/page-writeback.c
===================================================================
--- linux.orig/mm/page-writeback.c 2008-03-17 18:24:13.000000000 +0100
+++ linux/mm/page-writeback.c 2008-03-17 18:24:36.000000000 +0100
@@ -168,6 +168,16 @@ static inline void __bdi_writeout_inc(st
bdi->max_prop_frac);
}

+void bdi_writeout_inc(struct backing_dev_info *bdi)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ __bdi_writeout_inc(bdi);
+ local_irq_restore(flags);
+}
+EXPORT_SYMBOL(bdi_writeout_inc);
+
static inline void task_dirty_inc(struct task_struct *tsk)
{
prop_inc_single(&vm_dirties, &tsk->dirties);

--


2008-03-18 11:28:00

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [patch 1/8] mm: bdi: export bdi_writeout_inc()

On Mon, 2008-03-17 at 20:19 +0100, Miklos Szeredi wrote:
> plain text document attachment (export_bdi_writeout_inc.patch)
> From: Miklos Szeredi <[email protected]>
>
> Fuse needs this for writable mmap support.
>
> Signed-off-by: Miklos Szeredi <[email protected]>
> ---
> include/linux/backing-dev.h | 2 ++
> mm/page-writeback.c | 10 ++++++++++
> 2 files changed, 12 insertions(+)
>
> Index: linux/include/linux/backing-dev.h
> ===================================================================
> --- linux.orig/include/linux/backing-dev.h 2008-03-17 18:24:13.000000000 +0100
> +++ linux/include/linux/backing-dev.h 2008-03-17 18:24:36.000000000 +0100
> @@ -134,6 +134,8 @@ static inline s64 bdi_stat_sum(struct ba
> return sum;
> }
>
> +extern void bdi_writeout_inc(struct backing_dev_info *bdi);
> +
> /*
> * maximal error of a stat counter.
> */
> Index: linux/mm/page-writeback.c
> ===================================================================
> --- linux.orig/mm/page-writeback.c 2008-03-17 18:24:13.000000000 +0100
> +++ linux/mm/page-writeback.c 2008-03-17 18:24:36.000000000 +0100
> @@ -168,6 +168,16 @@ static inline void __bdi_writeout_inc(st
> bdi->max_prop_frac);
> }
>
> +void bdi_writeout_inc(struct backing_dev_info *bdi)
> +{
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + __bdi_writeout_inc(bdi);
> + local_irq_restore(flags);
> +}
> +EXPORT_SYMBOL(bdi_writeout_inc);
> +

May I ask to make this a _GPL export, please?

2008-03-18 11:47:10

by Miklos Szeredi

[permalink] [raw]
Subject: Re: [patch 1/8] mm: bdi: export bdi_writeout_inc()

> > +void bdi_writeout_inc(struct backing_dev_info *bdi)
> > +{
> > + unsigned long flags;
> > +
> > + local_irq_save(flags);
> > + __bdi_writeout_inc(bdi);
> > + local_irq_restore(flags);
> > +}
> > +EXPORT_SYMBOL(bdi_writeout_inc);
> > +
>
> May I ask to make this a _GPL export, please?

Sure.

Miklos