diff options
| author | David S. Miller <davem@davemloft.net> | 2015-07-13 17:28:09 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-07-13 17:28:09 -0700 |
| commit | 638d3c63811e31b2745f7fdd568b38c8abcffe03 (patch) | |
| tree | 606426ab4de84e59c5f50e1e3cce6e24819d45af /include/linux/backing-dev.h | |
| parent | 74fe61f17e999a458d5f64ca2aa9a0282ca32198 (diff) | |
| parent | f760b87f8f12eb262f14603e65042996fe03720e (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/bridge/br_mdb.c
Minor conflict in br_mdb.c, in 'net' we added a memset of the
on-stack 'ip' variable whereas in 'net-next' we assign a new
member 'vid'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/backing-dev.h')
| -rw-r--r-- | include/linux/backing-dev.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0e6d4828a77a..0fe9df983ab7 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -15,6 +15,7 @@ #include <linux/writeback.h> #include <linux/blk-cgroup.h> #include <linux/backing-dev-defs.h> +#include <linux/slab.h> int __must_check bdi_init(struct backing_dev_info *bdi); void bdi_destroy(struct backing_dev_info *bdi); @@ -465,11 +466,14 @@ static inline bool inode_cgwb_enabled(struct inode *inode) static inline struct bdi_writeback_congested * wb_congested_get_create(struct backing_dev_info *bdi, int blkcg_id, gfp_t gfp) { - return bdi->wb.congested; + atomic_inc(&bdi->wb_congested->refcnt); + return bdi->wb_congested; } static inline void wb_congested_put(struct bdi_writeback_congested *congested) { + if (atomic_dec_and_test(&congested->refcnt)) + kfree(congested); } static inline struct bdi_writeback *wb_find_current(struct backing_dev_info *bdi) |
