From 5a0e3ad6af8660be21ca98a971cd00f331318c05 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 24 Mar 2010 17:04:11 +0900 Subject: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo Guess-its-ok-by: Christoph Lameter Cc: Ingo Molnar Cc: Lee Schermerhorn --- fs/9p/cache.c | 1 + fs/9p/fid.c | 1 + fs/9p/v9fs.c | 1 + fs/9p/vfs_dentry.c | 1 + fs/9p/vfs_dir.c | 1 + fs/9p/vfs_inode.c | 1 + fs/9p/vfs_super.c | 1 + fs/adfs/super.c | 1 + fs/affs/bitmap.c | 1 + fs/affs/inode.c | 1 + fs/affs/super.c | 1 + fs/afs/cache.c | 1 - fs/afs/cmservice.c | 1 + fs/afs/dir.c | 1 - fs/afs/file.c | 2 +- fs/afs/fsclient.c | 1 + fs/afs/inode.c | 1 - fs/afs/mntpt.c | 2 +- fs/afs/rxrpc.c | 1 + fs/afs/vlclient.c | 1 + fs/afs/vlocation.c | 1 + fs/afs/vnode.c | 1 - fs/anon_inodes.c | 1 - fs/autofs/root.c | 1 + fs/autofs4/dev-ioctl.c | 1 + fs/autofs4/root.c | 1 + fs/befs/datastream.c | 1 - fs/binfmt_aout.c | 2 +- fs/binfmt_em86.c | 1 - fs/binfmt_script.c | 1 - fs/bio-integrity.c | 1 + fs/btrfs/acl.c | 1 + fs/btrfs/async-thread.c | 1 + fs/btrfs/compression.c | 1 + fs/btrfs/ctree.c | 1 + fs/btrfs/ctree.h | 1 + fs/btrfs/delayed-ref.c | 1 + fs/btrfs/disk-io.c | 1 + fs/btrfs/extent-tree.c | 1 + fs/btrfs/extent_io.c | 1 - fs/btrfs/extent_map.c | 1 - fs/btrfs/file-item.c | 1 + fs/btrfs/file.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/locking.c | 1 - fs/btrfs/ordered-data.c | 1 - fs/btrfs/ref-cache.c | 1 + fs/btrfs/relocation.c | 1 + fs/btrfs/super.c | 1 + fs/btrfs/transaction.c | 1 + fs/btrfs/tree-log.c | 1 + fs/btrfs/volumes.c | 1 + fs/cachefiles/interface.c | 1 + fs/cachefiles/namei.c | 1 + fs/cachefiles/rdwr.c | 1 + fs/cachefiles/xattr.c | 1 + fs/ceph/addr.c | 1 + fs/ceph/auth.c | 1 + fs/ceph/auth_none.c | 1 + fs/ceph/auth_x.c | 1 + fs/ceph/buffer.c | 3 +++ fs/ceph/caps.c | 1 + fs/ceph/crypto.c | 1 + fs/ceph/debugfs.c | 1 + fs/ceph/dir.c | 1 + fs/ceph/export.c | 1 + fs/ceph/file.c | 1 + fs/ceph/mds_client.c | 1 + fs/ceph/messenger.c | 1 + fs/ceph/mon_client.c | 1 + fs/ceph/osdmap.c | 4 +++- fs/ceph/pagelist.c | 1 + fs/ceph/snap.c | 1 + fs/ceph/super.c | 1 + fs/ceph/super.h | 1 + fs/ceph/xattr.c | 1 + fs/cifs/cifs_dfs_ref.c | 1 + fs/cifs/cifs_spnego.c | 1 + fs/cifs/cifs_unicode.c | 1 + fs/cifs/cifsacl.c | 1 + fs/cifs/cifsencrypt.c | 1 + fs/cifs/cifsglob.h | 1 + fs/cifs/cifssmb.c | 1 + fs/cifs/connect.c | 1 + fs/cifs/dns_resolve.c | 1 + fs/cifs/file.c | 1 + fs/cifs/inode.c | 1 + fs/cifs/link.c | 1 + fs/cifs/readdir.c | 1 + fs/cifs/sess.c | 1 + fs/cifs/smbencrypt.c | 1 + fs/cifs/transport.c | 1 + fs/cifs/xattr.c | 1 + fs/coda/dir.c | 1 + fs/coda/file.c | 1 + fs/coda/inode.c | 1 + fs/coda/upcall.c | 1 + fs/compat.c | 1 + fs/compat_ioctl.c | 2 +- fs/configfs/inode.c | 1 + fs/configfs/mount.c | 1 + fs/configfs/symlink.c | 1 + fs/debugfs/inode.c | 1 + fs/devpts/inode.c | 1 + fs/dlm/config.c | 1 + fs/dlm/debug_fs.c | 1 + fs/dlm/lock.c | 1 + fs/dlm/lowcomms.c | 1 + fs/dlm/netlink.c | 1 + fs/dlm/plock.c | 1 + fs/dlm/user.c | 1 + fs/ecryptfs/crypto.c | 1 + fs/ecryptfs/dentry.c | 1 + fs/ecryptfs/file.c | 1 + fs/ecryptfs/inode.c | 1 + fs/ecryptfs/keystore.c | 1 + fs/ecryptfs/kthread.c | 1 + fs/ecryptfs/main.c | 1 + fs/ecryptfs/messaging.c | 1 + fs/ecryptfs/miscdev.c | 1 + fs/ecryptfs/mmap.c | 1 + fs/ecryptfs/super.c | 1 + fs/eventfd.c | 1 + fs/exofs/inode.c | 1 + fs/exofs/ios.c | 1 + fs/exofs/super.c | 1 + fs/ext2/balloc.c | 1 + fs/ext2/xattr_security.c | 1 + fs/ext3/balloc.c | 1 + fs/ext3/xattr_security.c | 1 + fs/ext4/block_validity.c | 1 + fs/ext4/inode.c | 1 + fs/ext4/mballoc.c | 1 + fs/ext4/migrate.c | 1 + fs/ext4/move_extent.c | 1 + fs/ext4/xattr_security.c | 1 + fs/fat/cache.c | 1 + fs/fifo.c | 1 - fs/filesystems.c | 2 +- fs/freevxfs/vxfs_subr.c | 1 - fs/fs-writeback.c | 1 + fs/fscache/object-list.c | 1 + fs/fscache/operation.c | 1 + fs/fscache/page.c | 1 + fs/fuse/cuse.c | 1 + fs/generic_acl.c | 1 + fs/gfs2/bmap.c | 1 - fs/gfs2/dentry.c | 1 - fs/gfs2/export.c | 1 - fs/gfs2/glops.c | 1 - fs/gfs2/lock_dlm.c | 1 + fs/gfs2/rgrp.h | 2 ++ fs/gfs2/sys.c | 1 - fs/gfs2/util.c | 1 - fs/hfs/bnode.c | 1 + fs/hfs/btree.c | 1 + fs/hfs/mdb.c | 1 + fs/hfs/super.c | 1 + fs/hfsplus/options.c | 1 + fs/hostfs/hostfs_kern.c | 1 + fs/hpfs/buffer.c | 1 + fs/hpfs/dir.c | 1 + fs/hpfs/inode.c | 1 + fs/hpfs/super.c | 1 + fs/ioprio.c | 1 + fs/isofs/dir.c | 1 + fs/isofs/namei.c | 1 + fs/jbd/commit.c | 1 - fs/jbd/recovery.c | 1 - fs/jbd2/recovery.c | 1 - fs/jffs2/compr_lzo.c | 1 - fs/jffs2/compr_zlib.c | 1 - fs/jffs2/debug.c | 1 + fs/jffs2/file.c | 1 - fs/jffs2/nodelist.c | 1 - fs/jffs2/nodemgmt.c | 1 - fs/jffs2/symlink.c | 1 - fs/jffs2/write.c | 1 - fs/jfs/acl.c | 1 + fs/jfs/jfs_dmap.c | 1 + fs/jfs/jfs_dtree.c | 1 + fs/jfs/jfs_imap.c | 1 + fs/jfs/jfs_logmgr.c | 1 + fs/jfs/jfs_metapage.c | 1 + fs/jfs/jfs_unicode.h | 1 + fs/jfs/super.c | 1 + fs/jfs/xattr.c | 1 + fs/libfs.c | 1 + fs/lockd/clntlock.c | 1 + fs/lockd/clntproc.c | 1 + fs/lockd/mon.c | 1 + fs/lockd/svc.c | 1 - fs/lockd/svc4proc.c | 1 - fs/lockd/svclock.c | 1 + fs/lockd/svcproc.c | 1 - fs/lockd/svcsubs.c | 1 + fs/logfs/dev_bdev.c | 1 + fs/logfs/dir.c | 2 +- fs/logfs/gc.c | 1 + fs/logfs/inode.c | 1 + fs/logfs/journal.c | 1 + fs/logfs/readwrite.c | 1 + fs/logfs/segment.c | 1 + fs/logfs/super.c | 1 + fs/minix/itree_v1.c | 1 + fs/mpage.c | 1 + fs/ncpfs/dir.c | 1 - fs/ncpfs/file.c | 1 - fs/ncpfs/ioctl.c | 1 + fs/ncpfs/mmap.c | 2 +- fs/ncpfs/sock.c | 1 + fs/ncpfs/symlink.c | 1 + fs/nfs/cache_lib.c | 1 + fs/nfs/callback_proc.c | 1 + fs/nfs/callback_xdr.c | 1 + fs/nfs/client.c | 1 + fs/nfs/delegation.c | 1 + fs/nfs/direct.c | 1 + fs/nfs/dns_resolve.c | 1 + fs/nfs/file.c | 2 +- fs/nfs/fscache.c | 1 + fs/nfs/inode.c | 1 + fs/nfs/namespace.c | 1 + fs/nfs/nfs2xdr.c | 1 - fs/nfs/nfs3acl.c | 1 + fs/nfs/nfs3proc.c | 1 + fs/nfs/nfs3xdr.c | 1 - fs/nfs/nfs4namespace.c | 1 + fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 1 - fs/nfs/proc.c | 1 - fs/nfs/super.c | 1 + fs/nfs/symlink.c | 1 - fs/nfs_common/nfsacl.c | 1 + fs/nfsd/export.c | 1 + fs/nfsd/nfs2acl.c | 1 + fs/nfsd/nfs3acl.c | 1 + fs/nfsd/nfs4acl.c | 1 + fs/nfsd/nfs4callback.c | 1 + fs/nfsd/nfs4idmap.c | 1 + fs/nfsd/nfs4proc.c | 1 + fs/nfsd/nfs4recover.c | 1 + fs/nfsd/nfs4state.c | 1 + fs/nfsd/nfs4xdr.c | 1 + fs/nfsd/nfscache.c | 2 ++ fs/nfsd/nfsctl.c | 1 + fs/nfsd/vfs.c | 1 + fs/nilfs2/alloc.c | 1 + fs/nilfs2/btnode.c | 1 + fs/nilfs2/gcinode.c | 1 + fs/nilfs2/inode.c | 1 + fs/nilfs2/ioctl.c | 1 + fs/nilfs2/mdt.c | 1 + fs/nilfs2/page.c | 1 + fs/nilfs2/recovery.c | 1 + fs/nilfs2/segbuf.c | 1 + fs/nilfs2/segment.c | 1 + fs/nilfs2/the_nilfs.h | 1 + fs/notify/fsnotify.c | 1 + fs/notify/inode_mark.c | 1 - fs/ntfs/aops.c | 1 + fs/ntfs/attrib.c | 1 + fs/ntfs/compress.c | 1 + fs/ntfs/dir.c | 1 + fs/ntfs/file.c | 1 + fs/ntfs/index.c | 2 ++ fs/ntfs/mft.c | 1 + fs/ntfs/namei.c | 1 + fs/ocfs2/acl.c | 1 + fs/ocfs2/buffer_head_io.c | 1 - fs/ocfs2/cluster/heartbeat.c | 1 + fs/ocfs2/cluster/nodemanager.c | 1 + fs/ocfs2/cluster/quorum.c | 1 - fs/ocfs2/dlm/dlmast.c | 1 - fs/ocfs2/dlm/dlmconvert.c | 1 - fs/ocfs2/dlm/dlmthread.c | 1 - fs/ocfs2/dlm/dlmunlock.c | 1 - fs/ocfs2/extent_map.c | 1 + fs/ocfs2/heartbeat.c | 1 - fs/ocfs2/inode.c | 1 - fs/ocfs2/mmap.c | 1 - fs/ocfs2/quota_global.c | 1 + fs/ocfs2/quota_local.c | 1 + fs/ocfs2/refcounttree.c | 1 - fs/ocfs2/stack_o2cb.c | 1 + fs/ocfs2/stack_user.c | 1 + fs/ocfs2/sysfile.c | 1 - fs/omfs/inode.c | 1 + fs/open.c | 2 +- fs/partitions/check.c | 1 + fs/partitions/efi.c | 1 + fs/proc/array.c | 1 - fs/proc/base.c | 1 + fs/proc/generic.c | 1 + fs/proc/inode.c | 1 + fs/proc/kcore.c | 1 + fs/proc/nommu.c | 1 - fs/proc/proc_devtree.c | 1 + fs/proc/proc_net.c | 1 + fs/proc/stat.c | 1 - fs/proc/task_mmu.c | 1 + fs/proc/task_nommu.c | 1 + fs/proc/vmcore.c | 1 + fs/quota/netlink.c | 1 + fs/ramfs/file-nommu.c | 1 + fs/ramfs/inode.c | 1 + fs/reiserfs/dir.c | 1 + fs/reiserfs/fix_node.c | 1 + fs/reiserfs/inode.c | 1 + fs/reiserfs/journal.c | 1 + fs/reiserfs/namei.c | 1 + fs/reiserfs/super.c | 1 + fs/reiserfs/xattr.c | 1 + fs/reiserfs/xattr_acl.c | 1 + fs/reiserfs/xattr_security.c | 1 + fs/signalfd.c | 1 + fs/smbfs/file.c | 1 - fs/smbfs/smbiod.c | 1 - fs/smbfs/symlink.c | 1 + fs/splice.c | 1 + fs/squashfs/symlink.c | 1 - fs/squashfs/zlib_wrapper.c | 1 + fs/sync.c | 1 + fs/sysfs/inode.c | 1 + fs/sysfs/mount.c | 1 + fs/sysfs/symlink.c | 1 + fs/timerfd.c | 1 + fs/ubifs/commit.c | 1 + fs/ubifs/debug.c | 1 + fs/ubifs/file.c | 1 + fs/ubifs/gc.c | 1 + fs/ubifs/io.c | 1 + fs/ubifs/lpt.c | 1 + fs/ubifs/lpt_commit.c | 1 + fs/ubifs/recovery.c | 1 + fs/ubifs/sb.c | 1 + fs/ubifs/tnc.c | 1 + fs/ubifs/ubifs.h | 1 + fs/ubifs/xattr.c | 1 + fs/udf/partition.c | 1 - fs/udf/symlink.c | 1 - fs/udf/unicode.c | 1 + fs/xattr_acl.c | 2 +- fs/xfs/linux-2.6/kmem.c | 1 + fs/xfs/linux-2.6/xfs_acl.c | 1 + fs/xfs/linux-2.6/xfs_aops.c | 1 + fs/xfs/linux-2.6/xfs_buf.c | 2 +- fs/xfs/linux-2.6/xfs_ioctl.c | 1 + fs/xfs/linux-2.6/xfs_ioctl32.c | 1 + fs/xfs/linux-2.6/xfs_iops.c | 1 + fs/xfs/linux-2.6/xfs_super.c | 1 + 353 files changed, 300 insertions(+), 72 deletions(-) (limited to 'fs') diff --git a/fs/9p/cache.c b/fs/9p/cache.c index e777961939f..0dbe0d139ac 100644 --- a/fs/9p/cache.c +++ b/fs/9p/cache.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 08b2eb15704..82ee460e534 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 6c7f6a25111..cb57d332618 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index d74325295b1..cbf4e50f393 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d8a3afe4ff7..909711f57c0 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 5fe45d692c9..63c2b5af268 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 69357c0d989..a271549d9e2 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 6910a98bd73..4a3af7075c1 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include "adfs.h" diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c index 8306d53307e..3e262711ae0 100644 --- a/fs/affs/bitmap.c +++ b/fs/affs/bitmap.c @@ -7,6 +7,7 @@ * block allocation, deallocation, calculation of free space. */ +#include #include "affs.h" /* This is, of course, shamelessly stolen from fs/minix */ diff --git a/fs/affs/inode.c b/fs/affs/inode.c index c9744d771d9..f4b2a4ee4f9 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c @@ -10,6 +10,7 @@ * (C) 1991 Linus Torvalds - minix filesystem */ #include +#include #include "affs.h" extern const struct inode_operations affs_symlink_inode_operations; diff --git a/fs/affs/super.c b/fs/affs/super.c index d41e9673cd9..16a3e4765f6 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "affs.h" extern struct timezone sys_tz; diff --git a/fs/afs/cache.c b/fs/afs/cache.c index e2b1d3f1651..0fb315dd4d2 100644 --- a/fs/afs/cache.c +++ b/fs/afs/cache.c @@ -9,7 +9,6 @@ * 2 of the License, or (at your option) any later version. */ -#include #include #include "internal.h" diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index eb765489164..a3bcec75c54 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include "internal.h" diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 88067f36e5e..adc1cb771b5 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/afs/file.c b/fs/afs/file.c index 39b301662f2..0df9bc2b724 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -12,10 +12,10 @@ #include #include #include -#include #include #include #include +#include #include "internal.h" static int afs_readpage(struct file *file, struct page *page); diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 023b95b0d9d..4bd0218473a 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include "internal.h" diff --git a/fs/afs/inode.c b/fs/afs/inode.c index c048f065875..d00b312e311 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 5ffb570cd3a..5e813a816ce 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c @@ -12,11 +12,11 @@ #include #include #include -#include #include #include #include #include +#include #include "internal.h" diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index bde3f19c099..67cf810e0fd 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index 36c1306e09e..340afd0cd18 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include "internal.h" diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 6e689208def..9ac260d1361 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include "internal.h" diff --git a/fs/afs/vnode.c b/fs/afs/vnode.c index 2f05c4fc2a7..25cf4c3f4ff 100644 --- a/fs/afs/vnode.c +++ b/fs/afs/vnode.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include "internal.h" diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 2de009565d8..e4b75d6eda8 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 4a1401cea0a..8713c7cfbc7 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index c8a80dffb45..d29b7f6df86 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "autofs_i.h" diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a015b49891d..109a6c606d9 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include "autofs_i.h" diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index e3287d0d1a5..59096b5e0fc 100644 --- a/fs/befs/datastream.c +++ b/fs/befs/datastream.c @@ -11,7 +11,6 @@ */ #include -#include #include #include diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 9b6aef0f75e..f96eff04e11 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 32fb00b52cd..b8e8b0acf9b 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 08343505e18..aca9d55afb2 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index a16f29e888c..612a5c38d3c 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c @@ -24,6 +24,7 @@ #include #include #include +#include struct integrity_slab { struct kmem_cache *slab; diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 6df6d6ed74f..6ef7b26724e 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "ctree.h" #include "btrfs_inode.h" diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index c0861e781cd..462859a3014 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 28b92a7218a..629880ec8ac 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c4bc570a396..8e29260cd0b 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -17,6 +17,7 @@ */ #include +#include #include "ctree.h" #include "disk-io.h" #include "transaction.h" diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0af2e386857..8a6518a3f04 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "extent_io.h" #include "extent_map.h" diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 84e6781413b..902ce507c4e 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -17,6 +17,7 @@ */ #include +#include #include #include "ctree.h" #include "delayed-ref.h" diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 11d0ad30e20..e57ded75d91 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1727b26fb19..fa2907d531a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "compat.h" #include "hash.h" #include "ctree.h" diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c99121ac5d6..0adceb52516 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 28d87ba60ce..454ca52d645 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 9b99886562d..54a255065aa 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include "ctree.h" diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index ee3323c7fc1..29ff749ff4c 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "ctree.h" #include "disk-io.h" #include "transaction.h" diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index dd831ed31ee..f488fac04d9 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -18,6 +18,7 @@ #include #include +#include #include #include "ctree.h" #include "free-space-cache.h" diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 02bb099845f..2fe494c84e6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2845c6ceecd..9b3d73a0fdc 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 1c36e5cd8f5..6151f2ea38b 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -16,7 +16,6 @@ * Boston, MA 021110-1307, USA. */ #include -#include #include #include #include diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a8ffecd0b49..ecb22ff7d1f 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -16,7 +16,6 @@ * Boston, MA 021110-1307, USA. */ -#include #include #include #include diff --git a/fs/btrfs/ref-cache.c b/fs/btrfs/ref-cache.c index d0cc62bccb9..a97314cf6bd 100644 --- a/fs/btrfs/ref-cache.c +++ b/fs/btrfs/ref-cache.c @@ -17,6 +17,7 @@ */ #include +#include #include #include "ctree.h" #include "ref-cache.h" diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 0b23942cbc0..e558dd941de 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "ctree.h" #include "disk-io.h" #include "transaction.h" diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9ac612e6ca6..693a664318f 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "compat.h" #include "ctree.h" #include "disk-io.h" diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2d654c1c794..c0d0e3e7bc6 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1255fcc8ade..af57dd2b43d 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -17,6 +17,7 @@ */ #include +#include #include "ctree.h" #include "transaction.h" #include "disk-io.h" diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9df8e3f1cca..1692ec9cd7b 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 27089311fbe..37fe101a4e0 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c @@ -9,6 +9,7 @@ * 2 of the Licence, or (at your option) any later version. */ +#include #include #include #include "internal.h" diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index eeb4986ea7d..d5db84a1ee0 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "internal.h" #define CACHEFILES_KEYBUF_SIZE 512 diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 1d833256386..0f0d41fbb03 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c @@ -10,6 +10,7 @@ */ #include +#include #include #include "internal.h" diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c index f3e7a0bf068..e18b183b47e 100644 --- a/fs/cachefiles/xattr.c +++ b/fs/cachefiles/xattr.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "internal.h" static const char cachefiles_xattr_cache[] = diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index ce8ef610772..aa3cd7cc3e4 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -5,6 +5,7 @@ #include #include #include /* generic_writepages */ +#include #include #include diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c index abb204fea6c..f6394b94b86 100644 --- a/fs/ceph/auth.c +++ b/fs/ceph/auth.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include "types.h" diff --git a/fs/ceph/auth_none.c b/fs/ceph/auth_none.c index b4ef6f0a6c8..8cd9e3af07f 100644 --- a/fs/ceph/auth_none.c +++ b/fs/ceph/auth_none.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "auth_none.h" #include "auth.h" diff --git a/fs/ceph/auth_x.c b/fs/ceph/auth_x.c index 8d8a8496476..d9001a4dc8c 100644 --- a/fs/ceph/auth_x.c +++ b/fs/ceph/auth_x.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "auth_x.h" #include "auth_x_protocol.h" diff --git a/fs/ceph/buffer.c b/fs/ceph/buffer.c index b98086c7aeb..c67535d70aa 100644 --- a/fs/ceph/buffer.c +++ b/fs/ceph/buffer.c @@ -1,5 +1,8 @@ #include "ceph_debug.h" + +#include + #include "buffer.h" #include "decode.h" diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 7d0a0d0adc1..3710e077a85 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c index 291ac288e79..f704b3b6242 100644 --- a/fs/ceph/crypto.c +++ b/fs/ceph/crypto.c @@ -3,6 +3,7 @@ #include #include +#include #include #include "crypto.h" diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index e159f141511..f7048da92ac 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include #include diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 8a9116e15b7..7261dc6c2ea 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "super.h" diff --git a/fs/ceph/export.c b/fs/ceph/export.c index fc68e39cbad..9d67572fb32 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include "super.h" diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 5d2af8464f6..4add3d5da2c 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include #include diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 5c7920be642..60a9a4ae47b 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include "mds_client.h" diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index a32f0f896d9..8f1715ffbe4 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 890597c09d4..8fdc011ca95 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include #include diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index d82fe87c2a6..21c6623c4b0 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c @@ -1,4 +1,7 @@ +#include "ceph_debug.h" + +#include #include #include "super.h" @@ -6,7 +9,6 @@ #include "crush/hash.h" #include "crush/mapper.h" #include "decode.h" -#include "ceph_debug.h" char *ceph_osdmap_state_str(char *str, int len, int state) { diff --git a/fs/ceph/pagelist.c b/fs/ceph/pagelist.c index 370e9369547..5f8dbf7c745 100644 --- a/fs/ceph/pagelist.c +++ b/fs/ceph/pagelist.c @@ -1,4 +1,5 @@ +#include #include #include diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index df04e210a05..e6f9bc57d47 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c @@ -1,6 +1,7 @@ #include "ceph_debug.h" #include +#include #include "super.h" #include "decode.h" diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 4290a6e860b..75d02eaa127 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 65d12036b67..ca702c67bc6 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "types.h" #include "messenger.h" diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 37d6ce64569..2845422907f 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -3,6 +3,7 @@ #include "decode.h" #include +#include static bool ceph_is_valid_xattr(const char *name) { diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index b1d61d0bdfc..78e4d2a3a68 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include "cifsglob.h" diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 8ec7736ce95..310d12f69a9 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 714a542cbaf..d07676bd76d 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include "cifs_unicode.h" #include "cifs_uniupr.h" #include "cifspdu.h" diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 7dfe0842a6f..9b716d044bb 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -22,6 +22,7 @@ */ #include +#include #include "cifspdu.h" #include "cifsglob.h" #include "cifsacl.h" diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 7efe1745494..fbe986430d0 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -20,6 +20,7 @@ */ #include +#include #include "cifspdu.h" #include "cifsglob.h" #include "cifs_debug.h" diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 63c89d1d70b..ecf0ffbe2b6 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -18,6 +18,7 @@ */ #include #include +#include #include #include "cifs_fs_sb.h" #include "cifsacl.h" diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 7cc7f83e931..3f4fbd67050 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include "cifspdu.h" diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 45eb6cba793..d9566bf8f91 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 87948147d7e..6f8a0e3fb25 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c @@ -23,6 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include "dns_resolve.h" #include "cifsglob.h" diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ca2ba7a0193..058b390d3da 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "cifsfs.h" #include "cifspdu.h" diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 723daaccbd0..35ec1171621 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -20,6 +20,7 @@ */ #include #include +#include #include #include #include "cifsfs.h" diff --git a/fs/cifs/link.c b/fs/cifs/link.c index fc1e0487eae..c1a9d4236a8 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -20,6 +20,7 @@ */ #include #include +#include #include #include "cifsfs.h" #include "cifspdu.h" diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index c343b14ba2d..18e0bc1fb59 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include "cifspdu.h" #include "cifsglob.h" diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index aaa9c1c5a5b..7c3fd7463f4 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -29,6 +29,7 @@ #include "ntlmssp.h" #include "nterr.h" #include +#include #include "cifs_spnego.h" extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c index 93fb09a99c6..192ea51af20 100644 --- a/fs/cifs/smbencrypt.c +++ b/fs/cifs/smbencrypt.c @@ -24,6 +24,7 @@ */ #include +#include #include #include #include diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 07b8e71544e..ad081fe7eb1 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 3e2ef0de120..f555ce077d4 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c @@ -21,6 +21,7 @@ #include #include +#include #include "cifsfs.h" #include "cifspdu.h" #include "cifsglob.h" diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 4bb9d0a5dec..ccd98b0f2b0 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/coda/file.c b/fs/coda/file.c index ffd42815fda..4c813f2cdc5 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 830f51abb97..a1695dcadd9 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index c274d949179..f09c5ed76f6 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/compat.c b/fs/compat.c index 030602d453b..4b6ed03cc47 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6d55b61bfa7..c32a1b6a856 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -60,6 +59,7 @@ #include #include #include +#include #include #include diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index a2f746066c5..c8af2d91174 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "configfs_internal.h" diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 8421cea7d8c..8c8d64230c2 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "configfs_internal.h" diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index 32a5f46b115..0f3eb41d920 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "configfs_internal.h" diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 049d6c36da0..30a87b3dbca 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -27,6 +27,7 @@ #include #include #include +#include static struct vfsmount *debugfs_mount; static int debugfs_mount_count; diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 8882ecc0f1b..0120247b41c 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 0df24385081..b54bca03d92 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index 29d6139c35f..c6cf2515874 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "dlm_internal.h" #include "lock.h" diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 46ffd3eeaaf..17903b49129 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -56,6 +56,7 @@ L: receive_xxxx_reply() <- R: send_xxxx_reply() */ #include +#include #include "dlm_internal.h" #include #include "memory.h" diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 52cab160893..c0d35c62052 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 052095cd592..2c6ad518100 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "dlm_internal.h" diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index b5f89aef3b2..d45c02db694 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "dlm_internal.h" #include "lockspace.h" diff --git a/fs/dlm/user.c b/fs/dlm/user.c index a4bfd31ac45..8b6e73c4743 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "dlm_internal.h" #include "lockspace.h" diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 7cb0a59f4b9..efb2b940039 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 8f006a0d607..906e803f7f7 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "ecryptfs_kernel.h" /** diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 678172b61be..e7440a6f5eb 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 4a430ab4115..d3362faf385 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index a0a7847567e..89c5476506e 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "ecryptfs_kernel.h" /** diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c index e14cf7e588d..d8c3a373aaf 100644 --- a/fs/ecryptfs/kthread.c +++ b/fs/ecryptfs/kthread.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index ea2f92101df..af1a8f01eba 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "ecryptfs_kernel.h" /** diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index f1c17e87c5f..2d8dbce9d48 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -20,6 +20,7 @@ * 02111-1307, USA. */ #include +#include #include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 4ec8f61ccf5..3745f612bcd 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index df4ce99d059..d491237c98e 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "ecryptfs_kernel.h" diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index b15a43a80ab..fcef41c1d2c 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/eventfd.c b/fs/eventfd.c index 7758cc382ef..6bd3f76fdf8 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index a17e4b733e3..76d2a79ef93 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c @@ -31,6 +31,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c index 5293bc411d1..4337cad7777 100644 --- a/fs/exofs/ios.c +++ b/fs/exofs/ios.c @@ -22,6 +22,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 6cf5e4e84d6..18e57ea1e5b 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "exofs.h" diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 1d081f0cfec..3cf038c055d 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -13,6 +13,7 @@ #include "ext2.h" #include +#include #include #include #include diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c index c8155845ac0..b118c6383c6 100644 --- a/fs/ext2/xattr_security.c +++ b/fs/ext2/xattr_security.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 161da2d3f89..a177122a1b2 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ext3/xattr_security.c b/fs/ext3/xattr_security.c index 474348788dd..3af91f476df 100644 --- a/fs/ext3/xattr_security.c +++ b/fs/ext3/xattr_security.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 983f0e12749..538c4865508 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "ext4.h" struct ext4_system_zone { diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 11119e07233..5381802d605 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "ext4_jbd2.h" #include "xattr.h" diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 54df209d2ee..bde9d0b170c 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -23,6 +23,7 @@ #include "mballoc.h" #include +#include #include /* diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 8b87bd0eac9..34dcfc52ef4 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -13,6 +13,7 @@ */ #include +#include #include "ext4_jbd2.h" #include "ext4_extents.h" diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index aa5fe28d180..d1fc662cc31 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -15,6 +15,7 @@ #include #include +#include #include "ext4_jbd2.h" #include "ext4_extents.h" #include "ext4.h" diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c index 983c253999a..8b145e98df0 100644 --- a/fs/ext4/xattr_security.c +++ b/fs/ext4/xattr_security.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "ext4_jbd2.h" #include "ext4.h" #include "xattr.h" diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 923990e4f16..113f0a1e565 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c @@ -9,6 +9,7 @@ */ #include +#include #include #include "fat.h" diff --git a/fs/fifo.c b/fs/fifo.c index f8f97b8b6d4..5d6606ffc2d 100644 --- a/fs/fifo.c +++ b/fs/fifo.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/fs/filesystems.c b/fs/filesystems.c index a24c58e181d..68ba492d8ee 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -10,10 +10,10 @@ #include #include #include -#include #include #include #include +#include #include /* diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c index ed8f0b0dd88..1429f3ae1e8 100644 --- a/fs/freevxfs/vxfs_subr.c +++ b/fs/freevxfs/vxfs_subr.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "vxfs_extern.h" diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 76fc4d594ac..781a322ccb4 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c index 3221a0c7944..1e1f286dd70 100644 --- a/fs/fscache/object-list.c +++ b/fs/fscache/object-list.c @@ -12,6 +12,7 @@ #define FSCACHE_DEBUG_LEVEL COOKIE #include #include +#include #include #include #include "internal.h" diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c index 9f6c928d458..f17cecafae4 100644 --- a/fs/fscache/operation.c +++ b/fs/fscache/operation.c @@ -14,6 +14,7 @@ #define FSCACHE_DEBUG_LEVEL OPERATION #include #include +#include #include "internal.h" atomic_t fscache_op_debug_id; diff --git a/fs/fscache/page.c b/fs/fscache/page.c index 69809024d71..47aefd376e5 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "internal.h" /* diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index de792dcf327..e1f8171278b 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/fs/generic_acl.c b/fs/generic_acl.c index 55458031e50..fe5df545765 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 583e823307a..5e411d5f469 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -7,7 +7,6 @@ * of the GNU General Public License version 2. */ -#include #include #include #include diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c index 91beddadd38..bb7907bde3d 100644 --- a/fs/gfs2/dentry.c +++ b/fs/gfs2/dentry.c @@ -7,7 +7,6 @@ * of the GNU General Public License version 2. */ -#include #include #include #include diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c index d15876e9aa2..c22c2117483 100644 --- a/fs/gfs2/export.c +++ b/fs/gfs2/export.c @@ -7,7 +7,6 @@ * of the GNU General Public License version 2. */ -#include #include #include #include diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 38e3749d476..49f97d3bb69 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -7,7 +7,6 @@ * of the GNU General Public License version 2. */ -#include #include #include #include diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 569b46240f6..0e0470ed34c 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index b4106ddaaa9..f07119d8955 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h @@ -10,6 +10,8 @@ #ifndef __RGRP_DOT_H__ #define __RGRP_DOT_H__ +#include + struct gfs2_rgrpd; struct gfs2_sbd; struct gfs2_holder; diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 419042f7f0b..54fd9842599 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 226f2bfbf16..53511291fe3 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -7,7 +7,6 @@ * of the GNU General Public License version 2. */ -#include #include #include #include diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 0d200068d0a..cdb41a1f6a6 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -9,6 +9,7 @@ */ #include +#include #include #include "btree.h" diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 052f214ea6f..38a0a9917d7 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c @@ -9,6 +9,7 @@ */ #include +#include #include #include "btree.h" diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index 8bbe03c3f6d..86428f5ac99 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "hfs_fs.h" #include "btree.h" diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 5ed7252b7b2..0a81eb7111f 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 3fcbb0e1f6f..572628b4b07 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "hfsplus_fs.h" enum { diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 032604e5ef2..3a029d8f4cf 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include "hostfs.h" diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index b6fca543544..eac5f96323e 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c @@ -6,6 +6,7 @@ * general buffer i/o */ #include +#include #include "hpfs_fn.h" void hpfs_lock_creation(struct super_block *s) diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index 26e3964a4b8..2338130cceb 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c @@ -7,6 +7,7 @@ */ #include +#include #include "hpfs_fn.h" static int hpfs_dir_release(struct inode *inode, struct file *filp) diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index ff90affb94e..1042a9bc97f 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c @@ -7,6 +7,7 @@ */ #include +#include #include "hpfs_fn.h" void hpfs_init_inode(struct inode *i) diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index cadc4ce4865..aa53842c599 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -15,6 +15,7 @@ #include #include #include +#include /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */ diff --git a/fs/ioprio.c b/fs/ioprio.c index c7c0b28d7d2..748cfb92dcc 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -19,6 +19,7 @@ * See also Documentation/block/ioprio.txt * */ +#include #include #include #include diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index 8ba5441063b..b9ab69b3a48 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c @@ -11,6 +11,7 @@ * isofs directory handling functions */ #include +#include #include "isofs.h" int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode) diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index eaa831311c9..ab438beb867 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -7,6 +7,7 @@ */ #include +#include #include "isofs.h" /* diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 2c90e3ef625..ecb44c94ba8 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index cb1a49ae605..54c9bc9e1b1 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c @@ -20,7 +20,6 @@ #include #include #include -#include #endif /* diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 73063285b13..049281b7cb8 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #endif diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index 90cb60d0978..cd02acafde8 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index cfd301a5edf..b46661a4275 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -14,7 +14,6 @@ #endif #include -#include #include #include #include "nodelist.h" diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index 5544d31c066..ec353841392 100644 --- a/fs/jffs2/debug.c +++ b/fs/jffs2/debug.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "nodelist.h" #include "debug.h" diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index b7b74e29914..e7291c161a1 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index 87c6f555e1a..af02bd13846 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "nodelist.h" diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index 21a052915aa..191359dde4e 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include /* For cond_resched() */ diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index 4ec11e8bda8..b955626071c 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include "nodelist.h" diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index ca29440e943..c819eb0e982 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include "nodelist.h" diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 213169780b6..1057a4998e4 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include "jfs_incore.h" diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index d9b031cf69f..6c4dfcbf3f5 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -17,6 +17,7 @@ */ #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_dmap.h" diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 0e4623be70c..9197a1b0d02 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c @@ -102,6 +102,7 @@ #include #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_filsys.h" diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 0fc30407f03..f8332dc8eeb 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -45,6 +45,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_inode.h" diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 335c4de6552..c51af2a1451 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -70,6 +70,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_metapage.h" diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 07b6c5dfb4b..48b44bd8267 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/jfs/jfs_unicode.h b/fs/jfs/jfs_unicode.h index 3fbb3a22559..8f0f02cb6ca 100644 --- a/fs/jfs/jfs_unicode.h +++ b/fs/jfs/jfs_unicode.h @@ -19,6 +19,7 @@ #ifndef _H_JFS_UNICODE #define _H_JFS_UNICODE +#include #include #include "jfs_types.h" diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 266699deb1c..157382fa625 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 1f594ab2189..fa96bbb2634 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "jfs_incore.h" diff --git a/fs/libfs.c b/fs/libfs.c index 9e50bcf5585..ea9a6cc9b35 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index fc9032dc886..64fd427c993 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index c81249fef11..7932c399fab 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index fefa4df3f00..e3015464fba 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 7d150517ddf..f1bacf1a039 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index a7966eed3c1..031c6569a13 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index d1001790fa9..84055d31bfc 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index 56c9519d900..0f2ab741ae7 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index ad478da7ca6..d0ef94cfb3d 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index 9718c22f186..18e8c144c7f 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c @@ -9,6 +9,7 @@ #include #include #include +#include #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 56a8bfbb012..e1cb9956610 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c @@ -6,7 +6,7 @@ * Copyright (c) 2005-2008 Joern Engel */ #include "logfs.h" - +#include /* * Atomic dir operations diff --git a/fs/logfs/gc.c b/fs/logfs/gc.c index 92949f95a90..84e36f52fe9 100644 --- a/fs/logfs/gc.c +++ b/fs/logfs/gc.c @@ -7,6 +7,7 @@ */ #include "logfs.h" #include +#include /* * Wear leveling needs to kick in when the difference between low erase diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index 33ec1aeaeec..14ed27274da 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c @@ -6,6 +6,7 @@ * Copyright (c) 2005-2008 Joern Engel */ #include "logfs.h" +#include #include #include diff --git a/fs/logfs/journal.c b/fs/logfs/journal.c index 6ad30a4c905..f186043e862 100644 --- a/fs/logfs/journal.c +++ b/fs/logfs/journal.c @@ -6,6 +6,7 @@ * Copyright (c) 2005-2008 Joern Engel */ #include "logfs.h" +#include static void logfs_calc_free(struct super_block *sb) { diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 7a23b3e7c0a..d5919af2c7a 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c @@ -18,6 +18,7 @@ */ #include "logfs.h" #include +#include static u64 adjust_bix(u64 bix, level_t level) { diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c index 1a14f9910d5..614d7a6fda2 100644 --- a/fs/logfs/segment.c +++ b/fs/logfs/segment.c @@ -10,6 +10,7 @@ * three kinds of objects: inodes, dentries and blocks, both data and indirect. */ #include "logfs.h" +#include static int logfs_mark_segment_bad(struct super_block *sb, u32 segno) { diff --git a/fs/logfs/super.c b/fs/logfs/super.c index c66beab78de..46990eafe05 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c @@ -11,6 +11,7 @@ */ #include "logfs.h" #include +#include #include #include #include diff --git a/fs/minix/itree_v1.c b/fs/minix/itree_v1.c index 82d6554b02f..282e15ad8cd 100644 --- a/fs/minix/itree_v1.c +++ b/fs/minix/itree_v1.c @@ -1,4 +1,5 @@ #include +#include #include "minix.h" enum {DEPTH = 3, DIRECT = 7}; /* Only double indirect */ diff --git a/fs/mpage.c b/fs/mpage.c index 598d54e200e..fd56ca2ea55 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index b8b5b30d53f..7edfcd4d5e5 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ncpfs/file.c b/fs/ncpfs/file.c index 6a7d901f193..1daabb90e0a 100644 --- a/fs/ncpfs/file.c +++ b/fs/ncpfs/file.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index ec8f45f12e0..60a5e2864ea 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c index 15458decdb8..56f5b3a0e1e 100644 --- a/fs/ncpfs/mmap.c +++ b/fs/ncpfs/mmap.c @@ -9,12 +9,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index e37df8d5fe7..c7ff6c700a6 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ncpfs/symlink.c b/fs/ncpfs/symlink.c index e3d26c1bd10..c634fd17b33 100644 --- a/fs/ncpfs/symlink.c +++ b/fs/ncpfs/symlink.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "ncplib_kernel.h" diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c index b4ffd0146ea..84690319e62 100644 --- a/fs/nfs/cache_lib.c +++ b/fs/nfs/cache_lib.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 84761b5bb8e..a08770a7e85 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -7,6 +7,7 @@ */ #include #include +#include #include "nfs4_fs.h" #include "callback.h" #include "delegation.h" diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index a2b8b4df125..05af212f0ed 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "nfs4_fs.h" #include "callback.h" diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 2274f173733..2a3d352c0bf 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 2563bebc4c6..15671245c6e 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 0d289823e85..ad4cd31d605 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 3f0cd4dfdda..76fd235d002 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/file.c b/fs/nfs/file.c index ae0d9273653..8d965bddb87 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -24,9 +24,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 237874f1af2..a6b16ed9322 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "internal.h" #include "iostat.h" diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e358df75a6a..737128f777f 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 40c76678289..7888cf36022 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 7bc2da8efd4..81cf1425791 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index bac60515a4b..d150ae0c5ec 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 24992f0a29f..e701002694e 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 5fe5492fbd2..56a86f6ac8b 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index fa3408f2011..f071d12c613 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f9254fb0c9d..d79a7b37e56 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index dd17713413a..38f3b582e7c 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index c752d944fe9..0288be80444 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 6baf9a39346..e01637240ee 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c index 2ea9e5c27e5..05c9e02f415 100644 --- a/fs/nfs/symlink.c +++ b/fs/nfs/symlink.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c index 04133aacb1e..fc1c52571c0 100644 --- a/fs/nfs_common/nfsacl.c +++ b/fs/nfs_common/nfsacl.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index a0c4016413f..872a5ef550c 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -12,6 +12,7 @@ * Copyright (C) 1995, 1996 Olaf Kirch, */ +#include #include #include #include diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index f20589d2ae2..6aa5590c367 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c @@ -7,6 +7,7 @@ #include "nfsd.h" /* FIXME: nfsacl.h is a broken header */ #include +#include #include "cache.h" #include "xdr3.h" #include "vfs.h" diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c index e0c4846bad9..a596e9d987e 100644 --- a/fs/nfsd/nfs3acl.c +++ b/fs/nfsd/nfs3acl.c @@ -7,6 +7,7 @@ #include "nfsd.h" /* FIXME: nfsacl.h is a broken header */ #include +#include #include "cache.h" #include "xdr3.h" #include "vfs.h" diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 88150685df3..e4805261515 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -34,6 +34,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 4bc22c763de..7e32bd394e8 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -32,6 +32,7 @@ */ #include +#include #include "nfsd.h" #include "state.h" diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 6e2983b27f3..c78dbf49342 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -36,6 +36,7 @@ #include #include #include +#include /* * Cache entry diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 37514c46984..2ab9e8501bf 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -33,6 +33,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include +#include #include "cache.h" #include "xdr4.h" diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 98fb98e330b..7a9ae3254a4 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -32,6 +32,7 @@ */ #include +#include #include #include #include diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c97fddbd17d..6a8fedaa4f5 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -34,6 +34,7 @@ #include #include +#include #include #include #include diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index c47b4d7bafa..e1703175ee2 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -40,6 +40,7 @@ * at the end of nfs4svc_decode_compoundargs. */ +#include #include #include #include diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index da08560c481..4666a209678 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -8,6 +8,8 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ +#include + #include "nfsd.h" #include "cache.h" diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 0f0e77f2012..e3591073098 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -4,6 +4,7 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ +#include #include #include diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index a11b0e8678e..6dd5f1970e0 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c index 3f959f1879d..8d6356a804f 100644 --- a/fs/nilfs2/alloc.c +++ b/fs/nilfs2/alloc.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "mdt.h" #include "alloc.h" diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 471e269536a..447ce47a330 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "nilfs.h" #include "mdt.h" #include "dat.h" diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 8880a9e281e..145f03cd7d3 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include "nilfs.h" #include "page.h" diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 7868cc122ac..0957b58f909 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -22,6 +22,7 @@ */ #include +#include #include #include #include diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 313d0a21da4..c2ff1b30601 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c @@ -23,6 +23,7 @@ #include #include #include /* lock_kernel(), unlock_kernel() */ +#include #include /* capable() */ #include /* copy_from_user(), copy_to_user() */ #include diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 06713ffcc7f..024be8c35bb 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "nilfs.h" #include "segment.h" #include "page.h" diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index fc246dba112..8de3e1e4813 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "nilfs.h" #include "page.h" #include "mdt.h" diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index 017bedc761a..ba43146f3c3 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "nilfs.h" #include "segment.h" diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 6129a431aa3..17851f77f73 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "page.h" #include "segbuf.h" diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index c161d89061b..6a7dbd8451d 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "nilfs.h" #include "btnode.h" #include "page.h" diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index e9795f1724d..1ab97453369 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "sb.h" /* the_nilfs struct */ diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 037e878e03f..fcc2f064af8 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 3165d85aada..0399bcbe09c 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -87,7 +87,6 @@ #include #include #include -#include #include #include /* for inode_lock */ diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index cfce53cb65d..c3c2c7ac902 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 50d3b0c258e..f5094ee224c 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 08f7530e934..6551c7cbad9 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "attrib.h" #include "inode.h" diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 9173e82a45d..fe44d3feee4 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c @@ -21,6 +21,7 @@ */ #include +#include #include "dir.h" #include "aops.h" diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index b681c71d706..8804f093ba7 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #include diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c index 2194eff4974..096c135691a 100644 --- a/fs/ntfs/index.c +++ b/fs/ntfs/index.c @@ -19,6 +19,8 @@ * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #include "aops.h" #include "collate.h" #include "debug.h" diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 1caa0ef0b2b..b572b672718 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -21,6 +21,7 @@ */ #include +#include #include #include "attrib.h" diff --git a/fs/ntfs/namei.c b/fs/ntfs/namei.c index 2ca00153b6e..358273e59ad 100644 --- a/fs/ntfs/namei.c +++ b/fs/ntfs/namei.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "attrib.h" #include "debug.h" diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index 8ccf0f8c9cc..e13fc9e8fcd 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c @@ -21,6 +21,7 @@ #include #include +#include #include #define MLOG_MASK_PREFIX ML_INODE diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index 21c808f752d..ecebb227679 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 5c989000670..41d5f1f92d5 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "heartbeat.h" #include "tcp.h" diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index c81142e3ef8..ed0c9f367fe 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c @@ -19,6 +19,7 @@ * Boston, MA 021110-1307, USA. */ +#include #include #include #include diff --git a/fs/ocfs2/cluster/quorum.c b/fs/ocfs2/cluster/quorum.c index 639024033fc..cf3e1669621 100644 --- a/fs/ocfs2/cluster/quorum.c +++ b/fs/ocfs2/cluster/quorum.c @@ -44,7 +44,6 @@ * and if they're the last, they fire off the decision. */ #include -#include #include #include diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index dccc439fa08..a795eb91f4e 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index f283bce776b..90803b47cd8 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index 52ec020ea78..11a6d1fd1d3 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index 49e29ecd020..b47c1b92b82 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c index c562a7581cf..09e3fdfa6d3 100644 --- a/fs/ocfs2/extent_map.c +++ b/fs/ocfs2/extent_map.c @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index c6e7213db86..1aa863dd901 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c @@ -26,7 +26,6 @@ #include #include -#include #include #define MLOG_MASK_PREFIX ML_SUPER diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index ab207901d32..07cc8bb68b6 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 39737613424..7898bd3a99f 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 355f41d1d52..ab42a74c753 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -3,6 +3,7 @@ */ #include #include +#include #include #include #include diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index a6467f3d262..9ad49305f45 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 29405f2ff61..bd96f6c7877 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index 7020e1253ff..0d3049f696c 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c @@ -19,6 +19,7 @@ #include #include +#include #include /* Needed for AOP_TRUNCATED_PAGE in mlog_errno() */ diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 5ae8812b286..2dc57bca068 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ocfs2/sysfile.c b/fs/ocfs2/sysfile.c index 40e53702948..bfe7190cdbf 100644 --- a/fs/ocfs2/sysfile.c +++ b/fs/ocfs2/sysfile.c @@ -25,7 +25,6 @@ #include #include -#include #include #define MLOG_MASK_PREFIX ML_INODE diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index 75d9b5ba1d4..c82af6acc2e 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/open.c b/fs/open.c index e17f54454b5..74e5cd9f718 100644 --- a/fs/open.c +++ b/fs/open.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/partitions/check.c b/fs/partitions/check.c index e8865c11777..e238ab23a9e 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c index 49cfd5f5423..91babdae758 100644 --- a/fs/partitions/efi.c +++ b/fs/partitions/efi.c @@ -95,6 +95,7 @@ ************************************************************/ #include #include +#include #include "check.h" #include "efi.h" diff --git a/fs/proc/array.c b/fs/proc/array.c index aa8637b8102..e51f2ec2c5e 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -68,7 +68,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/proc/base.c b/fs/proc/base.c index a7310841c83..9e82adc37b0 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -81,6 +81,7 @@ #include #include #include +#include #include "internal.h" /* NOTE: diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 08f4d71dacd..43c12749060 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 445a02bcaab..d35b23238fb 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index b442dac8f5f..19979a2ce27 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 9fe7d7ebe11..b1822dde55c 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index f8650dce74f..ce94801f48c 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include "internal.h" diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 04d1270f1c3..9020ac15baa 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/proc/stat.c b/fs/proc/stat.c index b9b7aad2003..bf31b03fc27 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 183f8ff5f40..2d45889931f 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 5d9fd64ef81..46d4b5d72bd 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "internal.h" diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 0872afa58d3..9fbc99ec799 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c index 2663ed90fb0..d67908b407d 100644 --- a/fs/quota/netlink.c +++ b/fs/quota/netlink.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 1739a4aba25..5ea4ad81a42 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "internal.h" diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index a6090aa1a7c..c94853473ca 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include "internal.h" diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index c094f58c744..f8a6075abf5 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c @@ -8,6 +8,7 @@ #include #include #include +#include #include extern const struct reiserfs_key MIN_KEY; diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 6591cb21edf..1e4250bc3a6 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c @@ -35,6 +35,7 @@ **/ #include +#include #include #include #include diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d1da94b82d8..dc2c65e0485 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index f3de5e8a2ae..19fbc810e8e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -50,6 +50,7 @@ #include #include #include +#include #include diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 96e4cbbfaa1..d0c43cb99ff 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 04bf5d791bd..d8fd90d83ab 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 37d034ca7d9..4f9586bb763 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index dd20a7883f0..9cdb759645a 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index de1fcffd906..7271a477c04 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/signalfd.c b/fs/signalfd.c index 1dabe4ee02f..f329849ce3c 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index 92d5e8ffb63..dbf6548bbf0 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c index 6bd9b691a46..0e39a924f10 100644 --- a/fs/smbfs/smbiod.c +++ b/fs/smbfs/smbiod.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c index 00b2909bd46..54350b59046 100644 --- a/fs/smbfs/symlink.c +++ b/fs/smbfs/symlink.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/fs/splice.c b/fs/splice.c index 39208663aaf..9313b6124a2 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -30,6 +30,7 @@ #include #include #include +#include /* * Attempt to steal a page from a pipe buffer. This should perhaps go into diff --git a/fs/squashfs/symlink.c b/fs/squashfs/symlink.c index e80be2022a7..32b911f4ee3 100644 --- a/fs/squashfs/symlink.c +++ b/fs/squashfs/symlink.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 4dd70e04333..15a03d0fb9f 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c @@ -24,6 +24,7 @@ #include #include +#include #include #include "squashfs_fs.h" diff --git a/fs/sync.c b/fs/sync.c index f557d71cb09..fc5c3d75cf3 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 082daaecac1..a4a0a941971 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include "sysfs.h" diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 0cb10884a2f..776137828dc 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "sysfs.h" diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 1b9a3a1e8a1..b93ec51fa7a 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/fs/timerfd.c b/fs/timerfd.c index 1bfc95ad5f7..98158de91d2 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index 4775af40116..37fa7ed062d 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c @@ -45,6 +45,7 @@ #include #include +#include #include "ubifs.h" /** diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 90492327b38..c2a68baa782 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef CONFIG_UBIFS_FS_DEBUG diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index e26c02ab6cd..5692cf72b80 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -52,6 +52,7 @@ #include "ubifs.h" #include #include +#include static int read_block(struct inode *inode, void *addr, unsigned int block, struct ubifs_data_node *dn) diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index e5a3d8e96bb..918d1582ca0 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c @@ -53,6 +53,7 @@ * good, and GC takes extra care when moving them. */ +#include #include #include #include "ubifs.h" diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index e589fedaf1e..77d5cf4a754 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -51,6 +51,7 @@ */ #include +#include #include "ubifs.h" /** diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index b2792e84d24..ad7f67b827e 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c @@ -46,6 +46,7 @@ #include "ubifs.h" #include #include +#include /** * do_calc_lpt_geom - calculate sizes for the LPT area. diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 8cbfb824802..13cb7a4237b 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c @@ -26,6 +26,7 @@ */ #include +#include #include "ubifs.h" /** diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 868a55ee080..109c6ea03bb 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -31,6 +31,7 @@ */ #include +#include #include "ubifs.h" /** diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 57085e43320..96cb62c8a9d 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -27,6 +27,7 @@ */ #include "ubifs.h" +#include #include #include diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index e5b1a7d00fa..2194915220e 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -31,6 +31,7 @@ */ #include +#include #include "ubifs.h" /* diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index b2d976366a4..bd2542dad01 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 195830f4756..c74400f88fe 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -56,6 +56,7 @@ */ #include "ubifs.h" +#include #include #include diff --git a/fs/udf/partition.c b/fs/udf/partition.c index 4b540ee632d..745eb209be0 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c @@ -24,7 +24,6 @@ #include #include -#include #include uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index 852e9184568..16064787d2b 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index cefa8c8913e..d03a90b6ad6 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c @@ -24,6 +24,7 @@ #include /* for memset */ #include #include +#include #include "udf_sb.h" diff --git a/fs/xattr_acl.c b/fs/xattr_acl.c index 05ac0fe9c4d..8d5a506c82e 100644 --- a/fs/xattr_acl.c +++ b/fs/xattr_acl.c @@ -6,9 +6,9 @@ */ #include -#include #include #include +#include /* diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index bc7405585de..666c9db48eb 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c index bf85bbe4a9a..a7bc925c4d6 100644 --- a/fs/xfs/linux-2.6/xfs_acl.c +++ b/fs/xfs/linux-2.6/xfs_acl.c @@ -22,6 +22,7 @@ #include "xfs_inode.h" #include "xfs_vnodeops.h" #include "xfs_trace.h" +#include #include #include diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 99628508cb1..0f8b9968a80 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -40,6 +40,7 @@ #include "xfs_vnodeops.h" #include "xfs_trace.h" #include "xfs_bmap.h" +#include #include #include #include diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index bd111b7e1da..44c2b0ef9a4 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -18,7 +18,7 @@ #include "xfs.h" #include #include -#include +#include #include #include #include diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 4ea1ee18ade..7b26cc2fd28 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -58,6 +58,7 @@ #include #include #include +#include #include /* diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 0bf6d61f052..593c05b4df8 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 61a99608731..e65a7937f3a 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -56,6 +56,7 @@ #include #include #include +#include /* * Bring the timestamps in the XFS inode uptodate. diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 71345a370d9..52e06b487ce 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -61,6 +61,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3 From b7b7fa43103a9fb30dbcc60cbd5161fdfc25f904 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 29 Mar 2010 15:12:39 -0400 Subject: reiserfs: Fix locking BUG during mount failure Commit 8ebc423238341b52912c7295b045a32477b33f09 (reiserfs: kill-the-BKL) introduced a bug in the mount failure case. The error label releases the lock before calling journal_release_error, but it requires that the lock be held. do_journal_release unlocks and retakes it. When it releases it without it held, we trigger a BUG(). The error_alloc label skips the unlock since the lock isn't held yet but none of the other conditions that are clean up exist yet either. This patch returns immediately after the kzalloc failure and moves the reiserfs_write_unlock after the journal_release_error call. This was reported in https://bugzilla.novell.com/show_bug.cgi?id=591807 Reported-by: Thomas Siedentopf Signed-off-by: Jeff Mahoney Cc: Thomas Siedentopf Cc: Andrew Morton Cc: 2.6.33.x Signed-off-by: Frederic Weisbecker --- fs/reiserfs/super.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fs') diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 04bf5d791bd..ab190511bc1 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1618,10 +1618,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) save_mount_options(s, data); sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); - if (!sbi) { - errval = -ENOMEM; - goto error_alloc; - } + if (!sbi) + return -ENOMEM; s->s_fs_info = sbi; /* Set default values for options: non-aggressive tails, RO on errors */ REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); @@ -1878,12 +1876,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) return (0); error: - reiserfs_write_unlock(s); -error_alloc: if (jinit_done) { /* kill the commit thread, free journal ram */ journal_release_error(NULL, s); } + reiserfs_write_unlock(s); + reiserfs_free_bitmap_cache(s); if (SB_BUFFER_WITH_SB(s)) brelse(SB_BUFFER_WITH_SB(s)); -- cgit v1.2.3 From 2f3014fc2ab1e25c36531e19164c48182c168995 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Thu, 25 Mar 2010 17:22:45 +0000 Subject: Btrfs: remove duplicate include in ioctl.c fs/btrfs/ioctl.c: ctree.h is included more than once. Signed-off-by: Andrea Gelmini Signed-off-by: Chris Mason --- fs/btrfs/ioctl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2845c6ceecd..5c9f8b30608 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -48,7 +48,6 @@ #include "print-tree.h" #include "volumes.h" #include "locking.h" -#include "ctree.h" /* Mask out flags that are inappropriate for the given type of inode. */ static inline __u32 btrfs_mask_flags(umode_t mode, __u32 flags) -- cgit v1.2.3 From 90d2c51dbb4db05c040bc7db264bb7ab35e35455 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Thu, 25 Mar 2010 12:37:12 +0000 Subject: Btrfs: add NULL check for do_walk_down() btrfs_find_create_tree_block() may return NULL, so we must check the returned value, or we will access a NULL pointer. Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- fs/btrfs/extent-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1727b26fb19..503a18eaef5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5205,6 +5205,8 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans, next = btrfs_find_tree_block(root, bytenr, blocksize); if (!next) { next = btrfs_find_create_tree_block(root, bytenr, blocksize); + if (!next) + return -ENOMEM; reada = 1; } btrfs_tree_lock(next); @@ -5417,7 +5419,8 @@ static noinline int walk_down_tree(struct btrfs_trans_handle *trans, if (ret > 0) { path->slots[level]++; continue; - } + } else if (ret < 0) + return ret; level = wc->level; } return 0; -- cgit v1.2.3 From 471fa17dff556ad38caf26de097c0630530d8cbe Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Thu, 25 Mar 2010 12:35:14 +0000 Subject: Btrfs: Remove unnecessary finish_wait() in wait_current_trans() We only need to call finish_wait() after wait loop. By the way, this patch makes code of waiting loop similar to example in wait.h(no functional change) Signed-off-by: Zhao Lei Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- fs/btrfs/transaction.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2d654c1c794..43054285f63 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -147,18 +147,13 @@ static void wait_current_trans(struct btrfs_root *root) while (1) { prepare_to_wait(&root->fs_info->transaction_wait, &wait, TASK_UNINTERRUPTIBLE); - if (cur_trans->blocked) { - mutex_unlock(&root->fs_info->trans_mutex); - schedule(); - mutex_lock(&root->fs_info->trans_mutex); - finish_wait(&root->fs_info->transaction_wait, - &wait); - } else { - finish_wait(&root->fs_info->transaction_wait, - &wait); + if (!cur_trans->blocked) break; - } + mutex_unlock(&root->fs_info->trans_mutex); + schedule(); + mutex_lock(&root->fs_info->trans_mutex); } + finish_wait(&root->fs_info->transaction_wait, &wait); put_transaction(cur_trans); } } -- cgit v1.2.3 From ab59381ea43f81c977cbd09add26950aaf6cb9fe Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Thu, 25 Mar 2010 12:34:49 +0000 Subject: Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() We need to check return value of btrfs_search_slot() in btrfs_read_chunk_tree() and do corresponding error handing. Signed-off-by: Zhao Lei Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9df8e3f1cca..c6c80093eac 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3389,6 +3389,8 @@ int btrfs_read_chunk_tree(struct btrfs_root *root) key.type = 0; again: ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); + if (ret < 0) + goto error; while (1) { leaf = path->nodes[0]; slot = path->slots[0]; -- cgit v1.2.3 From f3eae7e8a5ed124bbc781e18ea10c21856017322 Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Thu, 25 Mar 2010 12:32:59 +0000 Subject: Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() We can use this simple method to make source more readable. Signed-off-by: Zhao Lei Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c6c80093eac..bf3bec3e413 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2198,9 +2198,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID1)) { - num_stripes = min_t(u64, 2, fs_devices->rw_devices); - if (num_stripes < 2) + if (fs_devices->rw_devices < 2) return -ENOSPC; + num_stripes = 2; min_stripes = 2; } if (type & (BTRFS_BLOCK_GROUP_RAID10)) { -- cgit v1.2.3 From 683be16eb6e19a35aca2473668652259ed074094 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 20 Mar 2010 11:24:48 +0000 Subject: Btrfs: dereferencing freed memory The original code dereferenced range on the next line. Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- fs/btrfs/ioctl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs') diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 5c9f8b30608..874d36e5f16 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1374,6 +1374,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) sizeof(*range))) { ret = -EFAULT; kfree(range); + goto out; } /* compression requires us to start the IO */ if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) { -- cgit v1.2.3 From c2b96929e2ca6914cf4a66cd8fe2a34c4a98277f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 20 Mar 2010 11:24:15 +0000 Subject: Btrfs: handle kmalloc() failure in inode lookup ioctl Return -ENOMEM if kmalloc() fails. Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- fs/btrfs/ioctl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs') diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 874d36e5f16..74d89133f76 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1211,6 +1211,9 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file, return -EPERM; args = kmalloc(sizeof(*args), GFP_KERNEL); + if (!args) + return -ENOMEM; + if (copy_from_user(args, argp, sizeof(*args))) { kfree(args); return -EFAULT; -- cgit v1.2.3 From 6cf8bfbf5e88edfb09a2bf0631a067060f534592 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 20 Mar 2010 11:22:10 +0000 Subject: Btrfs: check btrfs_get_extent return for IS_ERR() btrfs_get_extent() never returns NULL, only a valid pointer or ERR_PTR() Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 74d89133f76..2b7dd88fc54 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -510,7 +510,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len, em = btrfs_get_extent(inode, NULL, 0, start, len, 0); unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); - if (!em) + if (IS_ERR(em)) return 0; } -- cgit v1.2.3 From 1b1d1f6625e517a08640ddb4b8f8a0e025243fe3 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 19 Mar 2010 20:49:55 +0000 Subject: Btrfs: fail to mount if we have problems reading the block groups We don't actually check the return value of btrfs_read_block_groups, so we can possibly succeed to mount, but then fail to say read the superblock xattr for selinux which will cause the vfs code to deactivate the super. This is a problem because in find_free_extent we just assume that we will find the right space_info for the allocation we want. But if we failed to read the block groups, we won't have setup any space_info's, and we'll hit a NULL pointer deref in find_free_extent. This patch fixes that problem by checking the return value of btrfs_read_block_groups, and failing out properly. I've also added a check in find_free_extent so if for some reason we don't find an appropriate space_info, we just return -ENOSPC. Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/disk-io.c | 11 ++++++++--- fs/btrfs/extent-tree.c | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 11d0ad30e20..5ae1c0fcfce 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1922,7 +1922,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, csum_root->track_dirty = 1; - btrfs_read_block_groups(extent_root); + ret = btrfs_read_block_groups(extent_root); + if (ret) { + printk(KERN_ERR "Failed to read block groups: %d\n", ret); + goto fail_block_groups; + } fs_info->generation = generation; fs_info->last_trans_committed = generation; @@ -1932,7 +1936,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, "btrfs-cleaner"); if (IS_ERR(fs_info->cleaner_kthread)) - goto fail_csum_root; + goto fail_block_groups; fs_info->transaction_kthread = kthread_run(transaction_kthread, tree_root, @@ -2020,7 +2024,8 @@ fail_cleaner: filemap_write_and_wait(fs_info->btree_inode->i_mapping); invalidate_inode_pages2(fs_info->btree_inode->i_mapping); -fail_csum_root: +fail_block_groups: + btrfs_free_block_groups(fs_info); free_extent_buffer(csum_root->node); free_extent_buffer(csum_root->commit_root); fail_dev_root: diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 503a18eaef5..4c910359c80 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4170,6 +4170,10 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, ins->offset = 0; space_info = __find_space_info(root->fs_info, data); + if (!space_info) { + printk(KERN_ERR "No space info for %d\n", data); + return -ENOSPC; + } if (orig_root->ref_cows || empty_size) allowed_chunk_alloc = 1; @@ -7372,7 +7376,6 @@ static int find_first_block_group(struct btrfs_root *root, } path->slots[0]++; } - ret = -ENOENT; out: return ret; } -- cgit v1.2.3 From 287a0ab91d25ca982f895a76402e5893b47ed7a6 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 19 Mar 2010 18:07:23 +0000 Subject: Btrfs: kill max_extent mount option As Yan pointed out, theres not much reason for all this complicated math to account for file extents being split up into max_extent chunks, since they are likely to all end up in the same leaf anyway. Since there isn't much reason to use max_extent, just remove the option altogether so we have one less thing we need to test. Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 1 - fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/inode.c | 59 ++++--------------------------------------------- fs/btrfs/ordered-data.c | 6 +++-- fs/btrfs/super.c | 23 +++---------------- 6 files changed, 13 insertions(+), 81 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 11115847d87..ae8c40922c5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -834,7 +834,6 @@ struct btrfs_fs_info { u64 last_trans_log_full_commit; u64 open_ioctl_trans; unsigned long mount_opt; - u64 max_extent; u64 max_inline; u64 alloc_start; struct btrfs_transaction *running_transaction; diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5ae1c0fcfce..6632e5c4c8b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1634,7 +1634,6 @@ struct btrfs_root *open_ctree(struct super_block *sb, atomic_set(&fs_info->async_submit_draining, 0); atomic_set(&fs_info->nr_async_bios, 0); fs_info->sb = sb; - fs_info->max_extent = (u64)-1; fs_info->max_inline = 8192 * 1024; fs_info->metadata_ratio = 0; diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4c910359c80..5f6bc283c0c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2846,7 +2846,7 @@ int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root, } spin_unlock(&BTRFS_I(inode)->accounting_lock); - BTRFS_I(inode)->reserved_extents--; + BTRFS_I(inode)->reserved_extents -= num_items; BUG_ON(BTRFS_I(inode)->reserved_extents < 0); if (meta_sinfo->bytes_delalloc < num_bytes) { @@ -3111,7 +3111,7 @@ again: return -ENOSPC; } - BTRFS_I(inode)->reserved_extents++; + BTRFS_I(inode)->reserved_extents += num_items; check_force_delalloc(meta_sinfo); spin_unlock(&meta_sinfo->lock); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2a337a09c65..a85b90c86cb 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -796,7 +796,7 @@ static noinline int cow_file_range(struct inode *inode, while (disk_num_bytes > 0) { unsigned long op; - cur_alloc_size = min(disk_num_bytes, root->fs_info->max_extent); + cur_alloc_size = disk_num_bytes; ret = btrfs_reserve_extent(trans, root, cur_alloc_size, root->sectorsize, 0, alloc_hint, (u64)-1, &ins, 1); @@ -1227,30 +1227,9 @@ static int run_delalloc_range(struct inode *inode, struct page *locked_page, static int btrfs_split_extent_hook(struct inode *inode, struct extent_state *orig, u64 split) { - struct btrfs_root *root = BTRFS_I(inode)->root; - u64 size; - if (!(orig->state & EXTENT_DELALLOC)) return 0; - size = orig->end - orig->start + 1; - if (size > root->fs_info->max_extent) { - u64 num_extents; - u64 new_size; - - new_size = orig->end - split + 1; - num_extents = div64_u64(size + root->fs_info->max_extent - 1, - root->fs_info->max_extent); - - /* - * if we break a large extent up then leave oustanding_extents - * be, since we've already accounted for the large extent. - */ - if (div64_u64(new_size + root->fs_info->max_extent - 1, - root->fs_info->max_extent) < num_extents) - return 0; - } - spin_lock(&BTRFS_I(inode)->accounting_lock); BTRFS_I(inode)->outstanding_extents++; spin_unlock(&BTRFS_I(inode)->accounting_lock); @@ -1268,38 +1247,10 @@ static int btrfs_merge_extent_hook(struct inode *inode, struct extent_state *new, struct extent_state *other) { - struct btrfs_root *root = BTRFS_I(inode)->root; - u64 new_size, old_size; - u64 num_extents; - /* not delalloc, ignore it */ if (!(other->state & EXTENT_DELALLOC)) return 0; - old_size = other->end - other->start + 1; - if (new->start < other->start) - new_size = other->end - new->start + 1; - else - new_size = new->end - other->start + 1; - - /* we're not bigger than the max, unreserve the space and go */ - if (new_size <= root->fs_info->max_extent) { - spin_lock(&BTRFS_I(inode)->accounting_lock); - BTRFS_I(inode)->outstanding_extents--; - spin_unlock(&BTRFS_I(inode)->accounting_lock); - return 0; - } - - /* - * If we grew by another max_extent, just return, we want to keep that - * reserved amount. - */ - num_extents = div64_u64(old_size + root->fs_info->max_extent - 1, - root->fs_info->max_extent); - if (div64_u64(new_size + root->fs_info->max_extent - 1, - root->fs_info->max_extent) > num_extents) - return 0; - spin_lock(&BTRFS_I(inode)->accounting_lock); BTRFS_I(inode)->outstanding_extents--; spin_unlock(&BTRFS_I(inode)->accounting_lock); @@ -1328,6 +1279,7 @@ static int btrfs_set_bit_hook(struct inode *inode, u64 start, u64 end, BTRFS_I(inode)->outstanding_extents++; spin_unlock(&BTRFS_I(inode)->accounting_lock); btrfs_delalloc_reserve_space(root, inode, end - start + 1); + spin_lock(&root->fs_info->delalloc_lock); BTRFS_I(inode)->delalloc_bytes += end - start + 1; root->fs_info->delalloc_bytes += end - start + 1; @@ -1356,6 +1308,7 @@ static int btrfs_clear_bit_hook(struct inode *inode, if (bits & EXTENT_DO_ACCOUNTING) { spin_lock(&BTRFS_I(inode)->accounting_lock); + WARN_ON(!BTRFS_I(inode)->outstanding_extents); BTRFS_I(inode)->outstanding_extents--; spin_unlock(&BTRFS_I(inode)->accounting_lock); btrfs_unreserve_metadata_for_delalloc(root, inode, 1); @@ -5384,7 +5337,6 @@ free: void btrfs_drop_inode(struct inode *inode) { struct btrfs_root *root = BTRFS_I(inode)->root; - if (inode->i_nlink > 0 && btrfs_root_refs(&root->root_item) == 0) generic_delete_inode(inode); else @@ -5788,18 +5740,15 @@ static int prealloc_file_range(struct inode *inode, u64 start, u64 end, struct btrfs_trans_handle *trans; struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_key ins; - u64 alloc_size; u64 cur_offset = start; u64 num_bytes = end - start; int ret = 0; u64 i_size; while (num_bytes > 0) { - alloc_size = min(num_bytes, root->fs_info->max_extent); - trans = btrfs_start_transaction(root, 1); - ret = btrfs_reserve_extent(trans, root, alloc_size, + ret = btrfs_reserve_extent(trans, root, num_bytes, root->sectorsize, 0, alloc_hint, (u64)-1, &ins, 1); if (ret) { diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a8ffecd0b49..5c99882b976 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -303,6 +303,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, struct btrfs_ordered_extent *entry) { struct btrfs_ordered_inode_tree *tree; + struct btrfs_root *root = BTRFS_I(inode)->root; struct rb_node *node; tree = &BTRFS_I(inode)->ordered_tree; @@ -312,12 +313,13 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); spin_lock(&BTRFS_I(inode)->accounting_lock); + WARN_ON(!BTRFS_I(inode)->outstanding_extents); BTRFS_I(inode)->outstanding_extents--; spin_unlock(&BTRFS_I(inode)->accounting_lock); btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, inode, 1); - spin_lock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); + spin_lock(&root->fs_info->ordered_extent_lock); list_del_init(&entry->root_extent_list); /* @@ -329,7 +331,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { list_del_init(&BTRFS_I(inode)->ordered_operations); } - spin_unlock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); + spin_unlock(&root->fs_info->ordered_extent_lock); return 0; } diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9ac612e6ca6..d11b12fc086 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -64,10 +64,9 @@ static void btrfs_put_super(struct super_block *sb) enum { Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, - Opt_nodatacow, Opt_max_extent, Opt_max_inline, Opt_alloc_start, - Opt_nobarrier, Opt_ssd, Opt_nossd, Opt_ssd_spread, Opt_thread_pool, - Opt_noacl, Opt_compress, Opt_compress_force, Opt_notreelog, Opt_ratio, - Opt_flushoncommit, + Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, + Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, Opt_compress, + Opt_compress_force, Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, Opt_err, }; @@ -79,7 +78,6 @@ static match_table_t tokens = { {Opt_nodatasum, "nodatasum"}, {Opt_nodatacow, "nodatacow"}, {Opt_nobarrier, "nobarrier"}, - {Opt_max_extent, "max_extent=%s"}, {Opt_max_inline, "max_inline=%s"}, {Opt_alloc_start, "alloc_start=%s"}, {Opt_thread_pool, "thread_pool=%d"}, @@ -188,18 +186,6 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) info->thread_pool_size); } break; - case Opt_max_extent: - num = match_strdup(&args[0]); - if (num) { - info->max_extent = memparse(num, NULL); - kfree(num); - - info->max_extent = max_t(u64, - info->max_extent, root->sectorsize); - printk(KERN_INFO "btrfs: max_extent at %llu\n", - (unsigned long long)info->max_extent); - } - break; case Opt_max_inline: num = match_strdup(&args[0]); if (num) { @@ -529,9 +515,6 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",nodatacow"); if (btrfs_test_opt(root, NOBARRIER)) seq_puts(seq, ",nobarrier"); - if (info->max_extent != (u64)-1) - seq_printf(seq, ",max_extent=%llu", - (unsigned long long)info->max_extent); if (info->max_inline != 8192 * 1024) seq_printf(seq, ",max_inline=%llu", (unsigned long long)info->max_inline); -- cgit v1.2.3 From 0cad8a1130f77c7c445e3298c0e3593b3c0ef439 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 17 Mar 2010 20:45:56 +0000 Subject: Btrfs: fix chunk allocate size calculation If the amount of free space left in a device is less than what we think should be the minimum size, just ignore the minimum size and use the amount we have. I ran into this running tests on a 600mb volume, the chunk allocator wouldn't let me allocate the last 52mb of the disk for data because we want to have at least 64mb chunks for data. This patch fixes that problem. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/volumes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index bf3bec3e413..9bf1f581b87 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2244,8 +2244,10 @@ again: do_div(calc_size, stripe_len); calc_size *= stripe_len; } + /* we don't want tiny stripes */ - calc_size = max_t(u64, min_stripe_size, calc_size); + if (!looped) + calc_size = max_t(u64, min_stripe_size, calc_size); do_div(calc_size, stripe_len); calc_size *= stripe_len; -- cgit v1.2.3 From 30d1872d9eb3663b4cf7bdebcbf5cd465674cced Mon Sep 17 00:00:00 2001 From: Nikolaus Schulz Date: Thu, 1 Apr 2010 02:21:10 +0900 Subject: fat: fix buffer overflow in vfat_create_shortname() When using the string representation of a random counter as part of the base name, ensure that it is no longer than 4 bytes. Since we are repeatedly decrementing the counter in a loop until we have found a unique base name, the counter may wrap around zero; therefore, it is not enough to mask its higher bits before entering the loop, this must be done inside the loop. [hirofumi@mail.parknet.co.jp: use snprintf()] Signed-off-by: Nikolaus Schulz Cc: stable@kernel.org Signed-off-by: OGAWA Hirofumi Signed-off-by: Linus Torvalds --- fs/fat/namei_vfat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index c1ef5015486..6fcc7e71fba 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -309,7 +309,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, { struct fat_mount_options *opts = &MSDOS_SB(dir->i_sb)->options; wchar_t *ip, *ext_start, *end, *name_start; - unsigned char base[9], ext[4], buf[8], *p; + unsigned char base[9], ext[4], buf[5], *p; unsigned char charbuf[NLS_MAX_CHARSET_SIZE]; int chl, chi; int sz = 0, extlen, baselen, i, numtail_baselen, numtail2_baselen; @@ -467,7 +467,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, return 0; } - i = jiffies & 0xffff; + i = jiffies; sz = (jiffies >> 16) & 0x7; if (baselen > 2) { baselen = numtail2_baselen; @@ -476,7 +476,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, name_res[baselen + 4] = '~'; name_res[baselen + 5] = '1' + sz; while (1) { - sprintf(buf, "%04X", i); + snprintf(buf, sizeof(buf), "%04X", i & 0xffff); memcpy(&name_res[baselen], buf, 4); if (vfat_find_form(dir, name_res) < 0) break; -- cgit v1.2.3 From b95c35e76b29ba812e5dabdd91592e25ec640e93 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Thu, 1 Apr 2010 15:13:57 +0200 Subject: oom: fix the unsafe usage of badness() in proc_oom_score() proc_oom_score(task) has a reference to task_struct, but that is all. If this task was already released before we take tasklist_lock - we can't use task->group_leader, it points to nowhere - it is not safe to call badness() even if this task is ->group_leader, has_intersects_mems_allowed() assumes it is safe to iterate over ->thread_group list. - even worse, badness() can hit ->signal == NULL Add the pid_alive() check to ensure __unhash_process() was not called. Also, use "task" instead of task->group_leader. badness() should return the same result for any sub-thread. Currently this is not true, but this should be changed anyway. Signed-off-by: Oleg Nesterov Cc: stable@kernel.org Signed-off-by: Linus Torvalds --- fs/proc/base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/proc/base.c b/fs/proc/base.c index a7310841c83..b1f6e62773d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -442,12 +442,13 @@ static const struct file_operations proc_lstats_operations = { unsigned long badness(struct task_struct *p, unsigned long uptime); static int proc_oom_score(struct task_struct *task, char *buffer) { - unsigned long points; + unsigned long points = 0; struct timespec uptime; do_posix_clock_monotonic_gettime(&uptime); read_lock(&tasklist_lock); - points = badness(task->group_leader, uptime.tv_sec); + if (pid_alive(task)) + points = badness(task, uptime.tv_sec); read_unlock(&tasklist_lock); return sprintf(buffer, "%lu\n", points); } -- cgit v1.2.3 From d82ef020cf31504c816803b1def94eb5ff173363 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Fri, 2 Apr 2010 09:11:29 +0900 Subject: proc: pagemap: Hold mmap_sem during page walk In initial design, walk_page_range() was designed just for walking page table and it didn't require mmap_sem. Now, find_vma() etc.. are used in walk_page_range() and we need mmap_sem around it. This patch adds mmap_sem around walk_page_range(). Because /proc//pagemap's callback routine use put_user(), we have to get rid of it to do sane fix. Changelog: 2010/Apr/2 - fixed start_vaddr and end overflow Changelog: 2010/Apr/1 - fixed start_vaddr calculation - removed unnecessary cast. - removed unnecessary change in smaps. - use GFP_TEMPORARY instead of GFP_KERNEL Signed-off-by: KAMEZAWA Hiroyuki Cc: Matt Mackall Cc: KOSAKI Motohiro Cc: San Mehat Cc: Brian Swetland Cc: Dave Hansen Cc: Andrew Morton [ Fixed kmalloc failure return code as per Matt ] Signed-off-by: Linus Torvalds --- fs/proc/task_mmu.c | 87 ++++++++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 49 deletions(-) (limited to 'fs') diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 183f8ff5f40..096273984c3 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -406,6 +406,7 @@ static int show_smap(struct seq_file *m, void *v) memset(&mss, 0, sizeof mss); mss.vma = vma; + /* mmap_sem is held in m_start */ if (vma->vm_mm && !is_vm_hugetlb_page(vma)) walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); @@ -552,7 +553,8 @@ const struct file_operations proc_clear_refs_operations = { }; struct pagemapread { - u64 __user *out, *end; + int pos, len; + u64 *buffer; }; #define PM_ENTRY_BYTES sizeof(u64) @@ -575,10 +577,8 @@ struct pagemapread { static int add_to_pagemap(unsigned long addr, u64 pfn, struct pagemapread *pm) { - if (put_user(pfn, pm->out)) - return -EFAULT; - pm->out++; - if (pm->out >= pm->end) + pm->buffer[pm->pos++] = pfn; + if (pm->pos >= pm->len) return PM_END_OF_BUFFER; return 0; } @@ -720,21 +720,20 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long addr, * determine which areas of memory are actually mapped and llseek to * skip over unmapped regions. */ +#define PAGEMAP_WALK_SIZE (PMD_SIZE) static ssize_t pagemap_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); - struct page **pages, *page; - unsigned long uaddr, uend; struct mm_struct *mm; struct pagemapread pm; - int pagecount; int ret = -ESRCH; struct mm_walk pagemap_walk = {}; unsigned long src; unsigned long svpfn; unsigned long start_vaddr; unsigned long end_vaddr; + int copied = 0; if (!task) goto out; @@ -757,35 +756,12 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, if (!mm) goto out_task; - - uaddr = (unsigned long)buf & PAGE_MASK; - uend = (unsigned long)(buf + count); - pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE; - ret = 0; - if (pagecount == 0) - goto out_mm; - pages = kcalloc(pagecount, sizeof(struct page *), GFP_KERNEL); + pm.len = PM_ENTRY_BYTES * (PAGEMAP_WALK_SIZE >> PAGE_SHIFT); + pm.buffer = kmalloc(pm.len, GFP_TEMPORARY); ret = -ENOMEM; - if (!pages) + if (!pm.buffer) goto out_mm; - down_read(¤t->mm->mmap_sem); - ret = get_user_pages(current, current->mm, uaddr, pagecount, - 1, 0, pages, NULL); - up_read(¤t->mm->mmap_sem); - - if (ret < 0) - goto out_free; - - if (ret != pagecount) { - pagecount = ret; - ret = -EFAULT; - goto out_pages; - } - - pm.out = (u64 __user *)buf; - pm.end = (u64 __user *)(buf + count); - pagemap_walk.pmd_entry = pagemap_pte_range; pagemap_walk.pte_hole = pagemap_pte_hole; pagemap_walk.hugetlb_entry = pagemap_hugetlb_range; @@ -807,23 +783,36 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, * user buffer is tracked in "pm", and the walk * will stop when we hit the end of the buffer. */ - ret = walk_page_range(start_vaddr, end_vaddr, &pagemap_walk); - if (ret == PM_END_OF_BUFFER) - ret = 0; - /* don't need mmap_sem for these, but this looks cleaner */ - *ppos += (char __user *)pm.out - buf; - if (!ret) - ret = (char __user *)pm.out - buf; - -out_pages: - for (; pagecount; pagecount--) { - page = pages[pagecount-1]; - if (!PageReserved(page)) - SetPageDirty(page); - page_cache_release(page); + ret = 0; + while (count && (start_vaddr < end_vaddr)) { + int len; + unsigned long end; + + pm.pos = 0; + end = start_vaddr + PAGEMAP_WALK_SIZE; + /* overflow ? */ + if (end < start_vaddr || end > end_vaddr) + end = end_vaddr; + down_read(&mm->mmap_sem); + ret = walk_page_range(start_vaddr, end, &pagemap_walk); + up_read(&mm->mmap_sem); + start_vaddr = end; + + len = min(count, PM_ENTRY_BYTES * pm.pos); + if (copy_to_user(buf, pm.buffer, len) < 0) { + ret = -EFAULT; + goto out_free; + } + copied += len; + buf += len; + count -= len; } + *ppos += copied; + if (!ret || ret == PM_END_OF_BUFFER) + ret = copied; + out_free: - kfree(pages); + kfree(pm.buffer); out_mm: mmput(mm); out_task: -- cgit v1.2.3 From 476ada0436351672fbf482db54cb94b8ba877709 Mon Sep 17 00:00:00 2001 From: Sripathi Kodi Date: Wed, 17 Mar 2010 17:02:38 +0000 Subject: 9p: Fix setting of protocol flags in v9fs_session_info structure. This patch fixes a simple bug I left behind in my earlier protocol negotiation patch. Thanks, Sripathi. Signed-off-by: Sripathi Kodi Signed-off-by: Eric Van Hensbergen --- fs/9p/v9fs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fs') diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 6c7f6a25111..2f814cf0c73 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -241,7 +241,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, list_add(&v9ses->slist, &v9fs_sessionlist); spin_unlock(&v9fs_sessionlist_lock); - v9ses->flags = V9FS_PROTO_2000U | V9FS_ACCESS_USER; + v9ses->flags = V9FS_ACCESS_USER; strcpy(v9ses->uname, V9FS_DEFUSER); strcpy(v9ses->aname, V9FS_DEFANAME); v9ses->uid = ~0; @@ -262,8 +262,10 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, goto error; } - if (!p9_is_proto_dotu(v9ses->clnt)) - v9ses->flags &= ~V9FS_PROTO_2000U; + if (p9_is_proto_dotl(v9ses->clnt)) + v9ses->flags |= V9FS_PROTO_2000L; + else if (p9_is_proto_dotu(v9ses->clnt)) + v9ses->flags |= V9FS_PROTO_2000U; v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; -- cgit v1.2.3 From 5b0fa207d1a6f27c9a2f2d707147dce01af21db7 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Fri, 19 Mar 2010 12:47:26 +0000 Subject: fs/9p: Clunk the fid resulting from partial walk of the name Signed-off-by: Aneesh Kumar K.V Signed-off-by: Eric Van Hensbergen --- fs/9p/fid.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 08b2eb15704..b0a23c7e736 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -110,7 +110,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) { int i, n, l, clone, any, access; u32 uid; - struct p9_fid *fid; + struct p9_fid *fid, *old_fid = NULL; struct dentry *d, *ds; struct v9fs_session_info *v9ses; char **wnames, *uname; @@ -183,10 +183,18 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) l = min(n - i, P9_MAXWELEM); fid = p9_client_walk(fid, l, &wnames[i], clone); if (IS_ERR(fid)) { + if (old_fid) { + /* + * If we fail, clunk fid which are mapping + * to path component and not the last component + * of the path. + */ + p9_client_clunk(old_fid); + } kfree(wnames); return fid; } - + old_fid = fid; i += l; clone = 0; } -- cgit v1.2.3 From d994f4058d9f9be7e44529b55fc6be6552901ead Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Mon, 29 Mar 2010 18:14:50 -0500 Subject: 9p: drop nlink remove We need to drop the link count on the inode of a sucessfull remove Signed-off-by: Aneesh Kumar K.V Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 5fe45d692c9..ae839670770 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -431,6 +431,7 @@ error: static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) { + int retval; struct inode *file_inode; struct v9fs_session_info *v9ses; struct p9_fid *v9fid; @@ -444,7 +445,10 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) if (IS_ERR(v9fid)) return PTR_ERR(v9fid); - return p9_client_remove(v9fid); + retval = p9_client_remove(v9fid); + if (!retval) + drop_nlink(file_inode); + return retval; } static int -- cgit v1.2.3 From 6d96d3ab7aea5f0e75205a0c97f8d1fdf82c5287 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Mon, 29 Mar 2010 18:13:59 -0500 Subject: 9p: Make sure we are able to clunk the cached fid on umount dcache prune happen on umount. So we cannot mark the client satus disconnect. That will prevent a 9p call to the server Signed-off-by: Aneesh Kumar K.V Signed-off-by: Eric Van Hensbergen --- fs/9p/v9fs.c | 13 +++++++++++++ fs/9p/v9fs.h | 1 + fs/9p/vfs_super.c | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 2f814cf0c73..0b78ae8157b 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -342,6 +342,19 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses) { p9_client_disconnect(v9ses->clnt); } +/** + * v9fs_session_begin_cancel - Begin terminate of a session + * @v9ses: session to terminate + * + * After this call we don't allow any request other than clunk. + */ + +void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses) +{ + P9_DPRINTK(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses); + p9_client_begin_disconnect(v9ses->clnt); +} + extern int v9fs_error_init(void); static struct kobject *v9fs_kobj; diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index 6b801d1ddf4..a0a8d3dd136 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h @@ -108,6 +108,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *, const char *, char *); void v9fs_session_close(struct v9fs_session_info *v9ses); void v9fs_session_cancel(struct v9fs_session_info *v9ses); +void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses); #define V9FS_MAGIC 0x01021997 diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 69357c0d989..d1a3c809a29 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -193,6 +193,7 @@ static void v9fs_kill_super(struct super_block *s) kill_anon_super(s); + v9fs_session_cancel(v9ses); v9fs_session_close(v9ses); kfree(v9ses); s->s_fs_info = NULL; @@ -205,7 +206,7 @@ v9fs_umount_begin(struct super_block *sb) struct v9fs_session_info *v9ses; v9ses = sb->s_fs_info; - v9fs_session_cancel(v9ses); + v9fs_session_begin_cancel(v9ses); } static const struct super_operations v9fs_super_ops = { -- cgit v1.2.3 From 11e9b49b7fa056bfc00a56de8956d1d5fe8b84ea Mon Sep 17 00:00:00 2001 From: Sripathi Kodi Date: Mon, 29 Mar 2010 18:13:59 -0500 Subject: 9p: Creating files with names too long should fail with ENAMETOOLONG. Signed-off-by: Sripathi Kodi Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_inode.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs') diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index ae839670770..905f664b8bc 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -660,6 +660,9 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", dir, dentry->d_name.name, dentry, nameidata); + if (dentry->d_name.len > NAME_MAX) + return ERR_PTR(-ENAMETOOLONG); + sb = dir->i_sb; v9ses = v9fs_inode2v9ses(dir); dfid = v9fs_fid_lookup(dentry->d_parent); -- cgit v1.2.3 From 28ecb60906e86e74e9ad4ac7e0218d8631e73a94 Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Wed, 17 Mar 2010 13:31:04 +0000 Subject: Btrfs: use add_to_page_cache_lru, use __page_cache_alloc Pagecache pages should be allocated with __page_cache_alloc, so they obey pagecache memory policies. add_to_page_cache_lru is exported, so it should be used. Benefits over using a private pagevec: neater code, 128 bytes fewer stack used, percpu lru ordering is preserved, and finally don't need to flush pagevec before returning so batching may be shared with other LRU insertions. Signed-off-by: Nick Piggin : Signed-off-by: Chris Mason --- fs/btrfs/compression.c | 22 ++++------------------ fs/btrfs/extent_io.c | 15 +-------------- 2 files changed, 5 insertions(+), 32 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 28b92a7218a..1d54c5308df 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -31,7 +31,6 @@ #include #include #include -#include #include "compat.h" #include "ctree.h" #include "disk-io.h" @@ -445,7 +444,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, unsigned long nr_pages = 0; struct extent_map *em; struct address_space *mapping = inode->i_mapping; - struct pagevec pvec; struct extent_map_tree *em_tree; struct extent_io_tree *tree; u64 end; @@ -461,7 +459,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; - pagevec_init(&pvec, 0); while (last_offset < compressed_end) { page_index = last_offset >> PAGE_CACHE_SHIFT; @@ -478,26 +475,17 @@ static noinline int add_ra_bio_pages(struct inode *inode, goto next; } - page = alloc_page(mapping_gfp_mask(mapping) & ~__GFP_FS); + page = __page_cache_alloc(mapping_gfp_mask(mapping) & + ~__GFP_FS); if (!page) break; - page->index = page_index; - /* - * what we want to do here is call add_to_page_cache_lru, - * but that isn't exported, so we reproduce it here - */ - if (add_to_page_cache(page, mapping, - page->index, GFP_NOFS)) { + if (add_to_page_cache_lru(page, mapping, page_index, + GFP_NOFS)) { page_cache_release(page); goto next; } - /* open coding of lru_cache_add, also not exported */ - page_cache_get(page); - if (!pagevec_add(&pvec, page)) - __pagevec_lru_add_file(&pvec); - end = last_offset + PAGE_CACHE_SIZE - 1; /* * at this point, we have a locked page in the page cache @@ -551,8 +539,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, next: last_offset += PAGE_CACHE_SIZE; } - if (pagevec_count(&pvec)) - __pagevec_lru_add_file(&pvec); return 0; } diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c99121ac5d6..fc742e59815 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2679,33 +2679,20 @@ int extent_readpages(struct extent_io_tree *tree, { struct bio *bio = NULL; unsigned page_idx; - struct pagevec pvec; unsigned long bio_flags = 0; - pagevec_init(&pvec, 0); for (page_idx = 0; page_idx < nr_pages; page_idx++) { struct page *page = list_entry(pages->prev, struct page, lru); prefetchw(&page->flags); list_del(&page->lru); - /* - * what we want to do here is call add_to_page_cache_lru, - * but that isn't exported, so we reproduce it here - */ - if (!add_to_page_cache(page, mapping, + if (!add_to_page_cache_lru(page, mapping, page->index, GFP_KERNEL)) { - - /* open coding of lru_cache_add, also not exported */ - page_cache_get(page); - if (!pagevec_add(&pvec, page)) - __pagevec_lru_add_file(&pvec); __extent_read_full_page(tree, page, get_extent, &bio, 0, &bio_flags); } page_cache_release(page); } - if (pagevec_count(&pvec)) - __pagevec_lru_add_file(&pvec); BUG_ON(!list_empty(pages)); if (bio) submit_one_bio(READ, bio, 0, bio_flags); -- cgit v1.2.3 From b5cb160084fad438c513d0952849e597ffe9e3d9 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 12 Mar 2010 19:28:18 +0000 Subject: Btrfs: fix small race with delalloc flushing waitqueue's Everytime we start a new flushing thread, we init the waitqueue if there isn't a flushing thread running. The problem with this is we check space_info->flushing, which we clear right before doing a wake_up on the flushing waitqueue, which causes problems if we init the waitqueue in the middle of clearing the flushing flagh and calling wake_up. This is hard to hit, but the code is wrong anyway, so init the flushing/allocating waitqueue when creating the space info and let it be. I haven't seen the panic since I've been using this patch. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/extent-tree.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 5f6bc283c0c..101041d4d2b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2676,6 +2676,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, INIT_LIST_HEAD(&found->block_groups); init_rwsem(&found->groups_sem); + init_waitqueue_head(&found->flush_wait); + init_waitqueue_head(&found->allocate_wait); spin_lock_init(&found->lock); found->flags = flags; found->total_bytes = total_bytes; @@ -2944,12 +2946,10 @@ static void flush_delalloc(struct btrfs_root *root, spin_lock(&info->lock); - if (!info->flushing) { + if (!info->flushing) info->flushing = 1; - init_waitqueue_head(&info->flush_wait); - } else { + else wait = true; - } spin_unlock(&info->lock); @@ -3011,7 +3011,6 @@ static int maybe_allocate_chunk(struct btrfs_root *root, if (!info->allocating_chunk) { info->force_alloc = 1; info->allocating_chunk = 1; - init_waitqueue_head(&info->allocate_wait); } else { wait = true; } -- cgit v1.2.3 From 6bdb72ded1e281cd8844918c39d00cdd0e59f655 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Mar 2010 17:27:13 +0000 Subject: Btrfs: create snapshot references in same commit as snapshot This creates the reference to a new snapshot in the same commit as the snapshot itself. This avoids the need for a second commit in order for a snapshot to be persistent, and also avoids the problem of "leaking" a new snapshot tree root if the host crashes before the second commit takes place. It is not at all clear to me why it wasn't always done this way. If there is still a reason for the two-stage {create,finish}_pending_snapshots() approach I'm missing something! :) I've been running this for a couple weeks under pretty heavy usage (a few snapshots per minute) without obvious problems. Signed-off-by: Sage Weil Signed-off-by: Chris Mason --- fs/btrfs/transaction.c | 97 ++++++++++++++++---------------------------------- 1 file changed, 31 insertions(+), 66 deletions(-) (limited to 'fs') diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 43054285f63..01cebd66199 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -755,10 +755,17 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root_item *new_root_item; struct btrfs_root *tree_root = fs_info->tree_root; struct btrfs_root *root = pending->root; + struct btrfs_root *parent_root; + struct inode *parent_inode; struct extent_buffer *tmp; struct extent_buffer *old; int ret; u64 objectid; + int namelen; + u64 index = 0; + + parent_inode = pending->dentry->d_parent->d_inode; + parent_root = BTRFS_I(parent_inode)->root; new_root_item = kmalloc(sizeof(*new_root_item), GFP_NOFS); if (!new_root_item) { @@ -769,79 +776,59 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, if (ret) goto fail; - record_root_in_trans(trans, root); - btrfs_set_root_last_snapshot(&root->root_item, trans->transid); - memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); - key.objectid = objectid; /* record when the snapshot was created in key.offset */ key.offset = trans->transid; btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); - old = btrfs_lock_root_node(root); - btrfs_cow_block(trans, root, old, NULL, 0, &old); - btrfs_set_lock_blocking(old); - - btrfs_copy_root(trans, root, old, &tmp, objectid); - btrfs_tree_unlock(old); - free_extent_buffer(old); - - btrfs_set_root_node(new_root_item, tmp); - ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, - new_root_item); - btrfs_tree_unlock(tmp); - free_extent_buffer(tmp); - if (ret) - goto fail; - - key.offset = (u64)-1; memcpy(&pending->root_key, &key, sizeof(key)); -fail: - kfree(new_root_item); - return ret; -} - -static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info, - struct btrfs_pending_snapshot *pending) -{ - int ret; - int namelen; - u64 index = 0; - struct btrfs_trans_handle *trans; - struct inode *parent_inode; - struct btrfs_root *parent_root; - - parent_inode = pending->dentry->d_parent->d_inode; - parent_root = BTRFS_I(parent_inode)->root; - trans = btrfs_join_transaction(parent_root, 1); + pending->root_key.offset = (u64)-1; + record_root_in_trans(trans, parent_root); /* * insert the directory item */ namelen = strlen(pending->name); ret = btrfs_set_inode_index(parent_inode, &index); + BUG_ON(ret); ret = btrfs_insert_dir_item(trans, parent_root, pending->name, namelen, parent_inode->i_ino, &pending->root_key, BTRFS_FT_DIR, index); - - if (ret) - goto fail; + BUG_ON(ret); btrfs_i_size_write(parent_inode, parent_inode->i_size + namelen * 2); ret = btrfs_update_inode(trans, parent_root, parent_inode); BUG_ON(ret); + record_root_in_trans(trans, root); + btrfs_set_root_last_snapshot(&root->root_item, trans->transid); + memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); + + old = btrfs_lock_root_node(root); + btrfs_cow_block(trans, root, old, NULL, 0, &old); + btrfs_set_lock_blocking(old); + + btrfs_copy_root(trans, root, old, &tmp, objectid); + btrfs_tree_unlock(old); + free_extent_buffer(old); + + btrfs_set_root_node(new_root_item, tmp); + ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, + new_root_item); + BUG_ON(ret); + btrfs_tree_unlock(tmp); + free_extent_buffer(tmp); + ret = btrfs_add_root_ref(trans, parent_root->fs_info->tree_root, pending->root_key.objectid, parent_root->root_key.objectid, parent_inode->i_ino, index, pending->name, namelen); - BUG_ON(ret); fail: - btrfs_end_transaction(trans, fs_info->fs_root); + kfree(new_root_item); return ret; } @@ -862,25 +849,6 @@ static noinline int create_pending_snapshots(struct btrfs_trans_handle *trans, return 0; } -static noinline int finish_pending_snapshots(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info) -{ - struct btrfs_pending_snapshot *pending; - struct list_head *head = &trans->transaction->pending_snapshots; - int ret; - - while (!list_empty(head)) { - pending = list_entry(head->next, - struct btrfs_pending_snapshot, list); - ret = finish_pending_snapshot(fs_info, pending); - BUG_ON(ret); - list_del(&pending->list); - kfree(pending->name); - kfree(pending); - } - return 0; -} - static void update_super_roots(struct btrfs_root *root) { struct btrfs_root_item *root_item; @@ -1092,9 +1060,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, btrfs_finish_extent_commit(trans, root); - /* do the directory inserts of any pending snapshot creations */ - finish_pending_snapshots(trans, root->fs_info); - mutex_lock(&root->fs_info->trans_mutex); cur_trans->commit_done = 1; -- cgit v1.2.3 From 109f6aef5fc436f355ad027f4d97bd696df2049a Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Fri, 2 Apr 2010 09:20:18 -0400 Subject: Btrfs: add check for changed leaves in setup_leaf_for_split setup_leaf_for_split needs to drop the path and search again, and has checks to see if the item we want to split changed size. But, it misses the case where the leaf changed and now has enough room for the item we want to insert. This adds an extra check to make sure the leaf really needs splitting before we call btrfs_split_leaf(), which keeps us from trying to split a leaf with a single item. btrfs_split_leaf() will blindly split the single item leaf, leaving us with one good leaf and one empty leaf and then a crash. Signed-off-by: Chris Mason --- fs/btrfs/ctree.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs') diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c4bc570a396..babf7fbaec8 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -3040,6 +3040,10 @@ static noinline int setup_leaf_for_split(struct btrfs_trans_handle *trans, if (ret > 0 || item_size != btrfs_item_size_nr(leaf, path->slots[0])) goto err; + /* the leaf has changed, it now has room. return now */ + if (btrfs_leaf_free_space(root, path->nodes[0]) >= ins_len) + goto err; + if (key.type == BTRFS_EXTENT_DATA_KEY) { fi = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_file_extent_item); -- cgit v1.2.3 From 85a770a8889035625466a4cfb1393cd7d2ffd165 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 30 Mar 2010 09:41:25 +0000 Subject: 9p: return on mutex_lock_interruptible() If "err" is -EINTR here the original code calls mutex_unlock() and then returns, but it should just return directly. Signed-off-by: Dan Carpenter Signed-off-by: Eric Van Hensbergen ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --- fs/9p/vfs_dir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d8a3afe4ff7..bbe00cf799f 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -130,6 +130,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) rdir = (struct p9_rdir *) fid->rdir; err = mutex_lock_interruptible(&rdir->mutex); + if (err) + return err; while (err == 0) { if (rdir->tail == rdir->head) { err = v9fs_file_readn(filp, rdir->buf, NULL, -- cgit v1.2.3