diff options
author | root <root@artemis.panaceas.org> | 2015-12-25 15:00:15 +0000 |
---|---|---|
committer | root <root@artemis.panaceas.org> | 2015-12-25 15:00:15 +0000 |
commit | ddd86436f4e3643c04b797f858dab95d5f2e4de9 (patch) | |
tree | bfe7a780cf9a2f4fc33aec32c82e625e79dece1f /backport-include/linux/shmem_fs.h | |
download | backports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.tar.gz backports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.tar.bz2 backports-3.10.19-1-ddd86436f4e3643c04b797f858dab95d5f2e4de9.zip |
Diffstat (limited to 'backport-include/linux/shmem_fs.h')
-rw-r--r-- | backport-include/linux/shmem_fs.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/backport-include/linux/shmem_fs.h b/backport-include/linux/shmem_fs.h new file mode 100644 index 0000000..f32de7a --- /dev/null +++ b/backport-include/linux/shmem_fs.h @@ -0,0 +1,37 @@ +#ifndef __BACKPORT_LINUX_SHMEM_FS_H +#define __BACKPORT_LINUX_SHMEM_FS_H +#include_next <linux/shmem_fs.h> + + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) +/* This pulls-in a lot of non-exported symbol backports + * on kernels older than 2.6.32. There's no harm for not + * making this available on kernels < 2.6.32. */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) +#include <linux/pagemap.h> +/* This backports the 2nd part of: + * + * commit d9d90e5eb70e09903dadff42099b6c948f814050 + * Author: Hugh Dickins <hughd@google.com> + * Date: Mon Jun 27 16:18:04 2011 -0700 + * + * tmpfs: add shmem_read_mapping_page_gfp + * + * First part is in compat-3.0.c. + */ +#define shmem_read_mapping_page_gfp LINUX_BACKPORT(shmem_read_mapping_page_gfp) +extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, + pgoff_t index, gfp_t gfp); + + +#define shmem_read_mapping_page LINUX_BACKPORT(shmem_read_mapping_page) +static inline struct page *shmem_read_mapping_page( + struct address_space *mapping, pgoff_t index) +{ + return shmem_read_mapping_page_gfp(mapping, index, + mapping_gfp_mask(mapping)); +} +#endif +#endif + +#endif /* __BACKPORT_LINUX_SHMEM_FS_H */ |