summaryrefslogtreecommitdiff
path: root/fs/xfs/kmem.h
AgeCommit message (Collapse)AuthorFilesLines
2015-02-02xfs: change kmem_free to use generic kvfree()Wang, Yalin1-1/+4
Change kmem_free to use kvfree() generic function, remove the duplicated code. Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
2013-11-07xfs: simplify kmem_{zone_}zallocGu Zheng1-3/+18
Introduce flag KM_ZERO which is used to alloc zeroed entry, and convert kmem_{zone_}zalloc to call kmem_{zone_}alloc() with KM_ZERO directly, in order to avoid the setting to zero step. And following Dave's suggestion, make kmem_{zone_}zalloc static inline into kmem.h as they're now just a simple wrapper. V2: Make kmem_{zone_}zalloc static inline into kmem.h as Dave suggested. Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2013-09-10xfs: factor all the kmalloc-or-vmalloc fallback allocationsDave Chinner1-8/+1
We have quite a few places now where we do: x = kmem_zalloc(large size) if (!x) x = kmem_zalloc_large(large size) and do a similar dance when freeing the memory. kmem_free() already does the correct freeing dance, and kmem_zalloc_large() is only ever called in these constructs, so just factor it all into kmem_zalloc_large() and kmem_free(). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-05-30xfs: switch to proper __bitwise type for KM_... flagsAl Viro1-10/+11
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-02-10xfs: use a normal shrinker for the dquot freelistChristoph Hellwig1-6/+0
Stop reusing dquots from the freelist when allocating new ones directly, and implement a shrinker that actually follows the specifications for the interface. The shrinker implementation is still highly suboptimal at this point, but we can gradually work on it. This also fixes an bug in the previous lock ordering, where we would take the hash and dqlist locks inside of the freelist lock against the normal lock ordering. This is only solvable by introducing the dispose list, and thus not when using direct reclaim of unused dquots for new allocations. As a side-effect the quota upper bound and used to free ratio values in /proc/fs/xfs/xqm are set to 0 as these values don't make any sense in the new world order. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
2011-09-15Merge branch 'master' into for-nextJiri Kosina1-0/+119
Fast-forward merge with Linus to be able to merge patches based on more recent version of the tree.
2011-08-13xfs: remove subdirectoriesChristoph Hellwig1-0/+124
Use the move from Linux 2.6 to Linux 3.x as an excuse to kill the annoying subdirectories in the XFS source code. Besides the large amount of file rename the only changes are to the Makefile, a few files including headers with the subdirectory prefix, and the binary sysctl compat code that includes a header under fs/xfs/ from kernel/. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>