diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-06 17:13:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-06 17:13:21 -0800 |
commit | 75d4276e83a353d5e41da676f418d4a12f6f6e6c (patch) | |
tree | d3d9a43afa64f5d358b99b987b7ad8c0e2847dac /mm | |
parent | 5b6c02f38315b720c593c6079364855d276886aa (diff) | |
parent | 040ee69226f8a96b7943645d68f41d5d44b5ff7d (diff) | |
download | op-kernel-dev-75d4276e83a353d5e41da676f418d4a12f6f6e6c.zip op-kernel-dev-75d4276e83a353d5e41da676f418d4a12f6f6e6c.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
- untangle sys_close() abuses in xt_bpf
- deal with register_shrinker() failures in sget()
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'"
sget(): handle failures of register_shrinker()
mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index c02c850..47d5ced 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -297,10 +297,13 @@ EXPORT_SYMBOL(register_shrinker); */ void unregister_shrinker(struct shrinker *shrinker) { + if (!shrinker->nr_deferred) + return; down_write(&shrinker_rwsem); list_del(&shrinker->list); up_write(&shrinker_rwsem); kfree(shrinker->nr_deferred); + shrinker->nr_deferred = NULL; } EXPORT_SYMBOL(unregister_shrinker); |