Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Detach sched.h from mm.h

First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
they don't need sched.h
b) sched.h stops being dependency for significant number of files:
on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
after patch it's only 3744 (-8.3%).

Cross-compile tested on

all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
alpha alpha-up
arm
i386 i386-up i386-defconfig i386-allnoconfig
ia64 ia64-up
m68k
mips
parisc parisc-up
powerpc powerpc-up
s390 s390-up
sparc sparc-up
sparc64 sparc64-up
um-x86_64
x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
e8edc6e0 ff1be9ad

+126 -30
+2 -1
arch/arm/mach-iop13xx/pci.c
··· 19 19 20 20 #include <linux/pci.h> 21 21 #include <linux/delay.h> 22 - 22 + #include <linux/jiffies.h> 23 23 #include <asm/irq.h> 24 24 #include <asm/hardware.h> 25 25 #include <asm/sizes.h> 26 + #include <asm/signal.h> 26 27 #include <asm/mach/pci.h> 27 28 #include <asm/arch/pci.h> 28 29
+1 -1
arch/arm/mm/mmap.c
··· 5 5 #include <linux/mm.h> 6 6 #include <linux/mman.h> 7 7 #include <linux/shm.h> 8 - 8 + #include <linux/sched.h> 9 9 #include <asm/system.h> 10 10 11 11 #define COLOUR_ALIGN(addr,pgoff) \
+1
arch/arm/plat-iop/pci.c
··· 19 19 #include <linux/ioport.h> 20 20 #include <asm/io.h> 21 21 #include <asm/irq.h> 22 + #include <asm/signal.h> 22 23 #include <asm/system.h> 23 24 #include <asm/hardware.h> 24 25 #include <asm/mach/pci.h>
+1
arch/i386/kernel/cpu/cpufreq/speedstep-ich.c
··· 24 24 #include <linux/cpufreq.h> 25 25 #include <linux/pci.h> 26 26 #include <linux/slab.h> 27 + #include <linux/sched.h> 27 28 28 29 #include "speedstep-lib.h" 29 30
+1
arch/i386/kernel/cpu/cyrix.c
··· 7 7 #include <asm/processor.h> 8 8 #include <asm/timer.h> 9 9 #include <asm/pci-direct.h> 10 + #include <asm/tsc.h> 10 11 11 12 #include "cpu.h" 12 13
+1
arch/i386/mm/mmap.c
··· 27 27 #include <linux/personality.h> 28 28 #include <linux/mm.h> 29 29 #include <linux/random.h> 30 + #include <linux/sched.h> 30 31 31 32 /* 32 33 * Top of mmap area (just below the process stack).
+1 -1
arch/mips/kernel/unaligned.c
··· 76 76 #include <linux/module.h> 77 77 #include <linux/signal.h> 78 78 #include <linux/smp.h> 79 - 79 + #include <linux/sched.h> 80 80 #include <asm/asm.h> 81 81 #include <asm/branch.h> 82 82 #include <asm/byteorder.h>
+1 -1
arch/mips/mm/ioremap.c
··· 9 9 #include <linux/module.h> 10 10 #include <asm/addrspace.h> 11 11 #include <asm/byteorder.h> 12 - 12 + #include <linux/sched.h> 13 13 #include <linux/vmalloc.h> 14 14 #include <asm/cacheflush.h> 15 15 #include <asm/io.h>
+1 -1
arch/parisc/kernel/cache.c
··· 18 18 #include <linux/module.h> 19 19 #include <linux/seq_file.h> 20 20 #include <linux/pagemap.h> 21 - 21 + #include <linux/sched.h> 22 22 #include <asm/pdc.h> 23 23 #include <asm/cache.h> 24 24 #include <asm/cacheflush.h>
+1 -1
arch/parisc/kernel/processor.c
··· 33 33 #include <linux/seq_file.h> 34 34 #include <linux/slab.h> 35 35 #include <linux/cpu.h> 36 - 36 + #include <asm/param.h> 37 37 #include <asm/cache.h> 38 38 #include <asm/hardware.h> /* for register_parisc_driver() stuff */ 39 39 #include <asm/processor.h>
+1
arch/powerpc/mm/mmap.c
··· 24 24 25 25 #include <linux/personality.h> 26 26 #include <linux/mm.h> 27 + #include <linux/sched.h> 27 28 28 29 /* 29 30 * Top of mmap area (just below the process stack).
+1
arch/x86_64/ia32/mmap32.c
··· 29 29 #include <linux/personality.h> 30 30 #include <linux/mm.h> 31 31 #include <linux/random.h> 32 + #include <linux/sched.h> 32 33 33 34 /* 34 35 * Top of mmap area (just below the process stack).
+1
arch/x86_64/kernel/reboot.c
··· 8 8 #include <linux/string.h> 9 9 #include <linux/pm.h> 10 10 #include <linux/kdebug.h> 11 + #include <linux/sched.h> 11 12 #include <asm/io.h> 12 13 #include <asm/delay.h> 13 14 #include <asm/hw_irq.h>
+1
drivers/base/dmapool.c
··· 8 8 #include <linux/slab.h> 9 9 #include <linux/module.h> 10 10 #include <linux/poison.h> 11 + #include <linux/sched.h> 11 12 12 13 /* 13 14 * Pool allocator ... wraps the dma_alloc_coherent page allocator, so
+1
drivers/char/agp/frontend.c
··· 37 37 #include <linux/agpgart.h> 38 38 #include <linux/slab.h> 39 39 #include <linux/mm.h> 40 + #include <linux/sched.h> 40 41 #include <asm/uaccess.h> 41 42 #include <asm/pgtable.h> 42 43 #include "agp.h"
+1
drivers/char/agp/generic.c
··· 37 37 #include <linux/vmalloc.h> 38 38 #include <linux/dma-mapping.h> 39 39 #include <linux/mm.h> 40 + #include <linux/sched.h> 40 41 #include <asm/io.h> 41 42 #include <asm/cacheflush.h> 42 43 #include <asm/pgtable.h>
+1 -1
drivers/char/hangcheck-timer.c
··· 48 48 #include <linux/delay.h> 49 49 #include <asm/uaccess.h> 50 50 #include <linux/sysrq.h> 51 - 51 + #include <linux/timer.h> 52 52 53 53 #define VERSION_STR "0.9.0" 54 54
+1
drivers/infiniband/core/cache.c
··· 38 38 #include <linux/module.h> 39 39 #include <linux/errno.h> 40 40 #include <linux/slab.h> 41 + #include <linux/workqueue.h> 41 42 42 43 #include <rdma/ib_cache.h> 43 44
+1
drivers/infiniband/core/device.c
··· 40 40 #include <linux/slab.h> 41 41 #include <linux/init.h> 42 42 #include <linux/mutex.h> 43 + #include <linux/workqueue.h> 43 44 44 45 #include "core_priv.h" 45 46
+1
drivers/infiniband/core/umem.c
··· 36 36 37 37 #include <linux/mm.h> 38 38 #include <linux/dma-mapping.h> 39 + #include <linux/sched.h> 39 40 40 41 #include "uverbs.h" 41 42
+1
drivers/infiniband/hw/mthca/mthca_cmd.c
··· 37 37 #include <linux/completion.h> 38 38 #include <linux/pci.h> 39 39 #include <linux/errno.h> 40 + #include <linux/sched.h> 40 41 #include <asm/io.h> 41 42 #include <rdma/ib_mad.h> 42 43
+1
drivers/infiniband/hw/mthca/mthca_cq.c
··· 37 37 */ 38 38 39 39 #include <linux/hardirq.h> 40 + #include <linux/sched.h> 40 41 41 42 #include <asm/io.h> 42 43
+1
drivers/infiniband/hw/mthca/mthca_memfree.c
··· 36 36 37 37 #include <linux/mm.h> 38 38 #include <linux/scatterlist.h> 39 + #include <linux/sched.h> 39 40 40 41 #include <asm/page.h> 41 42
+1
drivers/infiniband/hw/mthca/mthca_qp.c
··· 37 37 38 38 #include <linux/string.h> 39 39 #include <linux/slab.h> 40 + #include <linux/sched.h> 40 41 41 42 #include <asm/io.h> 42 43
+1
drivers/infiniband/hw/mthca/mthca_srq.c
··· 34 34 35 35 #include <linux/slab.h> 36 36 #include <linux/string.h> 37 + #include <linux/sched.h> 37 38 38 39 #include <asm/io.h> 39 40
+1
drivers/isdn/icn/icn.c
··· 12 12 #include "icn.h" 13 13 #include <linux/module.h> 14 14 #include <linux/init.h> 15 + #include <linux/sched.h> 15 16 16 17 static int portbase = ICN_BASEADDR; 17 18 static unsigned long membase = ICN_MEMADDR;
+1 -1
drivers/isdn/sc/message.c
··· 16 16 * +1 (416) 297-8565 17 17 * +1 (416) 297-6433 Facsimile 18 18 */ 19 - 19 + #include <linux/sched.h> 20 20 #include "includes.h" 21 21 #include "hardware.h" 22 22 #include "message.h"
+1
drivers/kvm/kvm.h
··· 11 11 #include <linux/mutex.h> 12 12 #include <linux/spinlock.h> 13 13 #include <linux/mm.h> 14 + #include <asm/signal.h> 14 15 15 16 #include "vmx.h" 16 17 #include <linux/kvm.h>
+1
drivers/kvm/kvm_main.c
··· 40 40 #include <linux/file.h> 41 41 #include <linux/fs.h> 42 42 #include <linux/mount.h> 43 + #include <linux/sched.h> 43 44 44 45 #include "x86_emulate.h" 45 46 #include "segment_descriptor.h"
+1
drivers/kvm/svm.c
··· 19 19 #include <linux/vmalloc.h> 20 20 #include <linux/highmem.h> 21 21 #include <linux/profile.h> 22 + #include <linux/sched.h> 22 23 #include <asm/desc.h> 23 24 24 25 #include "kvm_svm.h"
+1
drivers/kvm/vmx.c
··· 22 22 #include <linux/mm.h> 23 23 #include <linux/highmem.h> 24 24 #include <linux/profile.h> 25 + #include <linux/sched.h> 25 26 #include <asm/io.h> 26 27 #include <asm/desc.h> 27 28
+1
drivers/oprofile/buffer_sync.c
··· 26 26 #include <linux/profile.h> 27 27 #include <linux/module.h> 28 28 #include <linux/fs.h> 29 + #include <linux/sched.h> 29 30 30 31 #include "oprofile_stats.h" 31 32 #include "event_buffer.h"
+1
drivers/pci/hotplug/ibmphp_hpc.c
··· 34 34 #include <linux/pci.h> 35 35 #include <linux/init.h> 36 36 #include <linux/mutex.h> 37 + #include <linux/sched.h> 37 38 38 39 #include "ibmphp.h" 39 40
+1
drivers/pci/pcie/aer/aerdrv.h
··· 8 8 #ifndef _AERDRV_H_ 9 9 #define _AERDRV_H_ 10 10 11 + #include <linux/workqueue.h> 11 12 #include <linux/pcieport_if.h> 12 13 #include <linux/aer.h> 13 14
+1 -1
drivers/scsi/megaraid/megaraid_mm.c
··· 14 14 * 15 15 * Common management module 16 16 */ 17 - 17 + #include <linux/sched.h> 18 18 #include "megaraid_mm.h" 19 19 20 20
+1
fs/9p/vfs_addr.c
··· 32 32 #include <linux/inet.h> 33 33 #include <linux/pagemap.h> 34 34 #include <linux/idr.h> 35 + #include <linux/sched.h> 35 36 36 37 #include "debug.h" 37 38 #include "v9fs.h"
+1
fs/9p/vfs_dentry.c
··· 33 33 #include <linux/inet.h> 34 34 #include <linux/namei.h> 35 35 #include <linux/idr.h> 36 + #include <linux/sched.h> 36 37 37 38 #include "debug.h" 38 39 #include "v9fs.h"
+1
fs/9p/vfs_inode.c
··· 33 33 #include <linux/inet.h> 34 34 #include <linux/namei.h> 35 35 #include <linux/idr.h> 36 + #include <linux/sched.h> 36 37 37 38 #include "debug.h" 38 39 #include "v9fs.h"
+1
fs/9p/vfs_super.c
··· 36 36 #include <linux/seq_file.h> 37 37 #include <linux/mount.h> 38 38 #include <linux/idr.h> 39 + #include <linux/sched.h> 39 40 40 41 #include "debug.h" 41 42 #include "v9fs.h"
+1 -1
fs/affs/inode.c
··· 9 9 * 10 10 * (C) 1991 Linus Torvalds - minix filesystem 11 11 */ 12 - 12 + #include <linux/sched.h> 13 13 #include "affs.h" 14 14 15 15 extern const struct inode_operations affs_symlink_inode_operations;
+1
fs/affs/super.c
··· 15 15 #include <linux/statfs.h> 16 16 #include <linux/parser.h> 17 17 #include <linux/magic.h> 18 + #include <linux/sched.h> 18 19 #include "affs.h" 19 20 20 21 extern struct timezone sys_tz;
+1
fs/afs/callback.c
··· 17 17 #include <linux/module.h> 18 18 #include <linux/init.h> 19 19 #include <linux/circ_buf.h> 20 + #include <linux/sched.h> 20 21 #include "internal.h" 21 22 22 23 unsigned afs_vnode_update_timeout = 10;
+1
fs/afs/cell.c
··· 13 13 #include <linux/slab.h> 14 14 #include <linux/key.h> 15 15 #include <linux/ctype.h> 16 + #include <linux/sched.h> 16 17 #include <keys/rxrpc-type.h> 17 18 #include "internal.h" 18 19
+1
fs/afs/dir.c
··· 16 16 #include <linux/fs.h> 17 17 #include <linux/pagemap.h> 18 18 #include <linux/ctype.h> 19 + #include <linux/sched.h> 19 20 #include "internal.h" 20 21 21 22 static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
+1
fs/afs/inode.c
··· 19 19 #include <linux/slab.h> 20 20 #include <linux/fs.h> 21 21 #include <linux/pagemap.h> 22 + #include <linux/sched.h> 22 23 #include "internal.h" 23 24 24 25 struct afs_iget_data {
+1
fs/afs/internal.h
··· 16 16 #include <linux/skbuff.h> 17 17 #include <linux/rxrpc.h> 18 18 #include <linux/key.h> 19 + #include <linux/workqueue.h> 19 20 #include "afs.h" 20 21 #include "afs_vl.h" 21 22
+1
fs/afs/main.c
··· 13 13 #include <linux/moduleparam.h> 14 14 #include <linux/init.h> 15 15 #include <linux/completion.h> 16 + #include <linux/sched.h> 16 17 #include "internal.h" 17 18 18 19 MODULE_DESCRIPTION("AFS Client File System");
+1
fs/afs/proc.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/proc_fs.h> 15 15 #include <linux/seq_file.h> 16 + #include <linux/sched.h> 16 17 #include <asm/uaccess.h> 17 18 #include "internal.h" 18 19
+1
fs/afs/security.c
··· 13 13 #include <linux/slab.h> 14 14 #include <linux/fs.h> 15 15 #include <linux/ctype.h> 16 + #include <linux/sched.h> 16 17 #include <keys/rxrpc-type.h> 17 18 #include "internal.h" 18 19
+1
fs/afs/super.c
··· 22 22 #include <linux/pagemap.h> 23 23 #include <linux/parser.h> 24 24 #include <linux/statfs.h> 25 + #include <linux/sched.h> 25 26 #include "internal.h" 26 27 27 28 #define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
+1
fs/afs/vlocation.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/module.h> 14 14 #include <linux/init.h> 15 + #include <linux/sched.h> 15 16 #include "internal.h" 16 17 17 18 unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */
+1
fs/afs/vnode.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/slab.h> 16 16 #include <linux/fs.h> 17 + #include <linux/sched.h> 17 18 #include "internal.h" 18 19 19 20 #if 0
+1
fs/afs/volume.c
··· 15 15 #include <linux/slab.h> 16 16 #include <linux/fs.h> 17 17 #include <linux/pagemap.h> 18 + #include <linux/sched.h> 18 19 #include "internal.h" 19 20 20 21 static const char *afs_voltypes[] = { "R/W", "R/O", "BAK" };
+1 -1
fs/binfmt_misc.c
··· 18 18 19 19 #include <linux/module.h> 20 20 #include <linux/init.h> 21 - 21 + #include <linux/sched.h> 22 22 #include <linux/binfmts.h> 23 23 #include <linux/slab.h> 24 24 #include <linux/ctype.h>
+1
fs/coda/cache.c
··· 16 16 #include <asm/uaccess.h> 17 17 #include <linux/string.h> 18 18 #include <linux/list.h> 19 + #include <linux/sched.h> 19 20 20 21 #include <linux/coda.h> 21 22 #include <linux/coda_linux.h>
+1 -1
fs/coda/upcall.c
··· 16 16 17 17 #include <asm/system.h> 18 18 #include <linux/signal.h> 19 - 19 + #include <linux/sched.h> 20 20 #include <linux/types.h> 21 21 #include <linux/kernel.h> 22 22 #include <linux/mm.h>
+1
fs/configfs/inode.c
··· 32 32 #include <linux/namei.h> 33 33 #include <linux/backing-dev.h> 34 34 #include <linux/capability.h> 35 + #include <linux/sched.h> 35 36 36 37 #include <linux/configfs.h> 37 38 #include "configfs_internal.h"
+1 -1
fs/ecryptfs/messaging.c
··· 19 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 20 * 02111-1307, USA. 21 21 */ 22 - 22 + #include <linux/sched.h> 23 23 #include "ecryptfs_kernel.h" 24 24 25 25 static LIST_HEAD(ecryptfs_msg_ctx_free_list);
+1
fs/fifo.c
··· 12 12 #include <linux/mm.h> 13 13 #include <linux/slab.h> 14 14 #include <linux/fs.h> 15 + #include <linux/sched.h> 15 16 #include <linux/pipe_fs_i.h> 16 17 17 18 static void wait_for_partner(struct inode* inode, unsigned int *cnt)
+1
fs/fuse/file.c
··· 11 11 #include <linux/pagemap.h> 12 12 #include <linux/slab.h> 13 13 #include <linux/kernel.h> 14 + #include <linux/sched.h> 14 15 15 16 static const struct file_operations fuse_direct_io_file_operations; 16 17
+1
fs/fuse/inode.c
··· 17 17 #include <linux/parser.h> 18 18 #include <linux/statfs.h> 19 19 #include <linux/random.h> 20 + #include <linux/sched.h> 20 21 21 22 MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>"); 22 23 MODULE_DESCRIPTION("Filesystem in Userspace");
+1
fs/gfs2/glock.h
··· 10 10 #ifndef __GLOCK_DOT_H__ 11 11 #define __GLOCK_DOT_H__ 12 12 13 + #include <linux/sched.h> 13 14 #include "incore.h" 14 15 15 16 /* Flags for lock requests; used in gfs2_holder gh_flag field.
+1
fs/hfs/inode.c
··· 13 13 14 14 #include <linux/pagemap.h> 15 15 #include <linux/mpage.h> 16 + #include <linux/sched.h> 16 17 17 18 #include "hfs_fs.h" 18 19 #include "btree.h"
+1
fs/hfsplus/inode.c
··· 12 12 #include <linux/fs.h> 13 13 #include <linux/pagemap.h> 14 14 #include <linux/mpage.h> 15 + #include <linux/sched.h> 15 16 16 17 #include "hfsplus_fs.h" 17 18 #include "hfsplus_raw.h"
+1 -1
fs/hpfs/buffer.c
··· 5 5 * 6 6 * general buffer i/o 7 7 */ 8 - 8 + #include <linux/sched.h> 9 9 #include "hpfs_fn.h" 10 10 11 11 void hpfs_lock_creation(struct super_block *s)
+1 -1
fs/hpfs/namei.c
··· 5 5 * 6 6 * adding & removing files & directories 7 7 */ 8 - 8 + #include <linux/sched.h> 9 9 #include "hpfs_fn.h" 10 10 11 11 static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+1
fs/hpfs/super.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/statfs.h> 14 14 #include <linux/magic.h> 15 + #include <linux/sched.h> 15 16 16 17 /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */ 17 18
+1
fs/minix/bitmap.c
··· 15 15 #include <linux/smp_lock.h> 16 16 #include <linux/buffer_head.h> 17 17 #include <linux/bitops.h> 18 + #include <linux/sched.h> 18 19 19 20 static int nibblemap[] = { 4,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0 }; 20 21
+1
fs/ncpfs/file.c
··· 17 17 #include <linux/mm.h> 18 18 #include <linux/slab.h> 19 19 #include <linux/vmalloc.h> 20 + #include <linux/sched.h> 20 21 21 22 #include <linux/ncp_fs.h> 22 23 #include "ncplib_kernel.h"
+1
fs/ncpfs/ioctl.c
··· 17 17 #include <linux/highuid.h> 18 18 #include <linux/smp_lock.h> 19 19 #include <linux/vmalloc.h> 20 + #include <linux/sched.h> 20 21 21 22 #include <linux/ncp_fs.h> 22 23
+1 -1
fs/nfs/client.c
··· 12 12 13 13 #include <linux/module.h> 14 14 #include <linux/init.h> 15 - 15 + #include <linux/sched.h> 16 16 #include <linux/time.h> 17 17 #include <linux/kernel.h> 18 18 #include <linux/mm.h>
+1
fs/nfs/dir.c
··· 33 33 #include <linux/pagevec.h> 34 34 #include <linux/namei.h> 35 35 #include <linux/mount.h> 36 + #include <linux/sched.h> 36 37 37 38 #include "nfs4_fs.h" 38 39 #include "delegation.h"
+1
fs/nfs/file.c
··· 27 27 #include <linux/slab.h> 28 28 #include <linux/pagemap.h> 29 29 #include <linux/smp_lock.h> 30 + #include <linux/aio.h> 30 31 31 32 #include <asm/uaccess.h> 32 33 #include <asm/system.h>
+1 -1
fs/nfs/inode.c
··· 15 15 16 16 #include <linux/module.h> 17 17 #include <linux/init.h> 18 - 18 + #include <linux/sched.h> 19 19 #include <linux/time.h> 20 20 #include <linux/kernel.h> 21 21 #include <linux/mm.h>
+1
fs/nfs/pagelist.c
··· 11 11 12 12 #include <linux/slab.h> 13 13 #include <linux/file.h> 14 + #include <linux/sched.h> 14 15 #include <linux/sunrpc/clnt.h> 15 16 #include <linux/nfs3.h> 16 17 #include <linux/nfs4.h>
+1
fs/nfsd/nfs4callback.c
··· 38 38 #include <linux/inet.h> 39 39 #include <linux/errno.h> 40 40 #include <linux/delay.h> 41 + #include <linux/sched.h> 41 42 #include <linux/sunrpc/xdr.h> 42 43 #include <linux/sunrpc/svc.h> 43 44 #include <linux/sunrpc/clnt.h>
+1 -1
fs/nfsd/nfs4recover.c
··· 45 45 #include <asm/uaccess.h> 46 46 #include <asm/scatterlist.h> 47 47 #include <linux/crypto.h> 48 - 48 + #include <linux/sched.h> 49 49 50 50 #define NFSDDBG_FACILITY NFSDDBG_PROC 51 51
+1 -1
fs/nfsd/nfssvc.c
··· 9 9 */ 10 10 11 11 #include <linux/module.h> 12 - 12 + #include <linux/sched.h> 13 13 #include <linux/time.h> 14 14 #include <linux/errno.h> 15 15 #include <linux/nfs.h>
+1
fs/ntfs/file.c
··· 26 26 #include <linux/swap.h> 27 27 #include <linux/uio.h> 28 28 #include <linux/writeback.h> 29 + #include <linux/sched.h> 29 30 30 31 #include <asm/page.h> 31 32 #include <asm/uaccess.h>
+1 -1
fs/ramfs/inode.c
··· 32 32 #include <linux/string.h> 33 33 #include <linux/backing-dev.h> 34 34 #include <linux/ramfs.h> 35 - 35 + #include <linux/sched.h> 36 36 #include <asm/uaccess.h> 37 37 #include "internal.h" 38 38
+1
fs/smbfs/dir.c
··· 13 13 #include <linux/smp_lock.h> 14 14 #include <linux/ctype.h> 15 15 #include <linux/net.h> 16 + #include <linux/sched.h> 16 17 17 18 #include <linux/smb_fs.h> 18 19 #include <linux/smb_mount.h>
+1
fs/smbfs/file.c
··· 17 17 #include <linux/pagemap.h> 18 18 #include <linux/smp_lock.h> 19 19 #include <linux/net.h> 20 + #include <linux/aio.h> 20 21 21 22 #include <asm/uaccess.h> 22 23 #include <asm/system.h>
+1
fs/smbfs/inode.c
··· 25 25 #include <linux/net.h> 26 26 #include <linux/vfs.h> 27 27 #include <linux/highuid.h> 28 + #include <linux/sched.h> 28 29 #include <linux/smb_fs.h> 29 30 #include <linux/smbno.h> 30 31 #include <linux/smb_mount.h>
+1
fs/smbfs/request.c
··· 11 11 #include <linux/fs.h> 12 12 #include <linux/slab.h> 13 13 #include <linux/net.h> 14 + #include <linux/sched.h> 14 15 15 16 #include <linux/smb_fs.h> 16 17 #include <linux/smbno.h>
+1
fs/sysfs/inode.c
··· 13 13 #include <linux/backing-dev.h> 14 14 #include <linux/capability.h> 15 15 #include <linux/errno.h> 16 + #include <linux/sched.h> 16 17 #include <asm/semaphore.h> 17 18 #include "sysfs.h" 18 19
+1
fs/udf/file.c
··· 36 36 #include <linux/smp_lock.h> 37 37 #include <linux/pagemap.h> 38 38 #include <linux/buffer_head.h> 39 + #include <linux/aio.h> 39 40 40 41 #include "udf_i.h" 41 42 #include "udf_sb.h"
+1
fs/udf/namei.c
··· 30 30 #include <linux/quotaops.h> 31 31 #include <linux/smp_lock.h> 32 32 #include <linux/buffer_head.h> 33 + #include <linux/sched.h> 33 34 34 35 static inline int udf_match(int len1, const char *name1, int len2, const char *name2) 35 36 {
+2
include/asm-arm/tlbflush.h
··· 144 144 145 145 #ifndef __ASSEMBLY__ 146 146 147 + #include <linux/sched.h> 148 + 147 149 struct cpu_tlb_fns { 148 150 void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *); 149 151 void (*flush_kern_range)(unsigned long, unsigned long);
+2
include/asm-i386/tlbflush.h
··· 90 90 91 91 #ifndef CONFIG_SMP 92 92 93 + #include <linux/sched.h> 94 + 93 95 #define flush_tlb() __flush_tlb() 94 96 #define flush_tlb_all() __flush_tlb_all() 95 97 #define local_flush_tlb() __flush_tlb()
+1
include/asm-mips/pgalloc.h
··· 11 11 12 12 #include <linux/highmem.h> 13 13 #include <linux/mm.h> 14 + #include <linux/sched.h> 14 15 15 16 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, 16 17 pte_t *pte)
+1
include/asm-parisc/mmu_context.h
··· 2 2 #define __PARISC_MMU_CONTEXT_H 3 3 4 4 #include <linux/mm.h> 5 + #include <linux/sched.h> 5 6 #include <asm/atomic.h> 6 7 #include <asm/pgalloc.h> 7 8 #include <asm/pgtable.h>
+1
include/asm-parisc/tlbflush.h
··· 4 4 /* TLB flushing routines.... */ 5 5 6 6 #include <linux/mm.h> 7 + #include <linux/sched.h> 7 8 #include <asm/mmu_context.h> 8 9 9 10
+1
include/asm-powerpc/mmu_context.h
··· 8 8 9 9 #include <linux/kernel.h> 10 10 #include <linux/mm.h> 11 + #include <linux/sched.h> 11 12 #include <asm/mmu.h> 12 13 #include <asm/cputable.h> 13 14 #include <asm-generic/mm_hooks.h>
+1
include/asm-x86_64/calgary.h
··· 27 27 #include <linux/spinlock.h> 28 28 #include <linux/device.h> 29 29 #include <linux/dma-mapping.h> 30 + #include <linux/timer.h> 30 31 #include <asm/types.h> 31 32 32 33 struct iommu_table {
+1
include/asm-x86_64/tlbflush.h
··· 2 2 #define _X8664_TLBFLUSH_H 3 3 4 4 #include <linux/mm.h> 5 + #include <linux/sched.h> 5 6 #include <asm/processor.h> 6 7 #include <asm/system.h> 7 8
+2 -9
include/linux/mm.h
··· 1 1 #ifndef _LINUX_MM_H 2 2 #define _LINUX_MM_H 3 3 4 - #include <linux/sched.h> 5 4 #include <linux/errno.h> 6 5 #include <linux/capability.h> 7 6 ··· 19 20 20 21 struct mempolicy; 21 22 struct anon_vma; 23 + struct user_struct; 22 24 23 25 #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ 24 26 extern unsigned long max_mapnr; ··· 717 717 unsigned long flags); 718 718 #endif 719 719 720 - static inline int can_do_mlock(void) 721 - { 722 - if (capable(CAP_IPC_LOCK)) 723 - return 1; 724 - if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0) 725 - return 1; 726 - return 0; 727 - } 720 + extern int can_do_mlock(void); 728 721 extern int user_shm_lock(size_t, struct user_struct *); 729 722 extern void user_shm_unlock(size_t, struct user_struct *); 730 723
+1
include/linux/smb_fs.h
··· 9 9 #ifndef _LINUX_SMB_FS_H 10 10 #define _LINUX_SMB_FS_H 11 11 12 + #include <linux/jiffies.h> 12 13 #include <linux/smb.h> 13 14 14 15 /*
+2
include/linux/task_io_accounting_ops.h
··· 4 4 #ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED 5 5 #define __TASK_IO_ACCOUNTING_OPS_INCLUDED 6 6 7 + #include <linux/sched.h> 8 + 7 9 #ifdef CONFIG_TASK_IO_ACCOUNTING 8 10 static inline void task_io_account_read(size_t bytes) 9 11 {
+2
include/linux/writeback.h
··· 4 4 #ifndef WRITEBACK_H 5 5 #define WRITEBACK_H 6 6 7 + #include <linux/sched.h> 8 + 7 9 struct backing_dev_info; 8 10 9 11 extern spinlock_t inode_lock;
+1
include/rdma/ib_umem.h
··· 35 35 36 36 #include <linux/list.h> 37 37 #include <linux/scatterlist.h> 38 + #include <linux/workqueue.h> 38 39 39 40 struct ib_ucontext; 40 41
+1
kernel/profile.c
··· 26 26 #include <asm/sections.h> 27 27 #include <asm/semaphore.h> 28 28 #include <asm/irq_regs.h> 29 + #include <asm/ptrace.h> 29 30 30 31 struct profile_hit { 31 32 u32 pc, hits;
+2
kernel/time/ntp.c
··· 11 11 #include <linux/mm.h> 12 12 #include <linux/time.h> 13 13 #include <linux/timex.h> 14 + #include <linux/jiffies.h> 15 + #include <linux/hrtimer.h> 14 16 15 17 #include <asm/div64.h> 16 18 #include <asm/timex.h>
+1 -1
lib/ioremap.c
··· 7 7 */ 8 8 #include <linux/vmalloc.h> 9 9 #include <linux/mm.h> 10 - 10 + #include <linux/sched.h> 11 11 #include <asm/cacheflush.h> 12 12 #include <asm/pgtable.h> 13 13
+1
mm/filemap_xip.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/uio.h> 15 15 #include <linux/rmap.h> 16 + #include <linux/sched.h> 16 17 #include <asm/tlbflush.h> 17 18 #include "filemap.h" 18 19
+1
mm/madvise.c
··· 10 10 #include <linux/syscalls.h> 11 11 #include <linux/mempolicy.h> 12 12 #include <linux/hugetlb.h> 13 + #include <linux/sched.h> 13 14 14 15 /* 15 16 * Any behaviour which results in changes to the vma->vm_flags needs to
+11
mm/mlock.c
··· 10 10 #include <linux/mm.h> 11 11 #include <linux/mempolicy.h> 12 12 #include <linux/syscalls.h> 13 + #include <linux/sched.h> 14 + #include <linux/module.h> 13 15 16 + int can_do_mlock(void) 17 + { 18 + if (capable(CAP_IPC_LOCK)) 19 + return 1; 20 + if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0) 21 + return 1; 22 + return 0; 23 + } 24 + EXPORT_SYMBOL(can_do_mlock); 14 25 15 26 static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev, 16 27 unsigned long start, unsigned long end, unsigned int newflags)
+1
mm/msync.c
··· 12 12 #include <linux/mman.h> 13 13 #include <linux/file.h> 14 14 #include <linux/syscalls.h> 15 + #include <linux/sched.h> 15 16 16 17 /* 17 18 * MS_SYNC syncs the entire file - including mappings.
+1
mm/vmstat.c
··· 12 12 #include <linux/mm.h> 13 13 #include <linux/module.h> 14 14 #include <linux/cpu.h> 15 + #include <linux/sched.h> 15 16 16 17 #ifdef CONFIG_VM_EVENT_COUNTERS 17 18 DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
+1
sound/sound_firmware.c
··· 3 3 #include <linux/fs.h> 4 4 #include <linux/mm.h> 5 5 #include <linux/slab.h> 6 + #include <linux/sched.h> 6 7 #include <asm/uaccess.h> 7 8 #include "oss/sound_firmware.h" 8 9