aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-03-03mqueue: remove unneeded info->messages initializationAndré Goddard Rosa1-8/+5
... and abort earlier if we couldn't allocate the message pointers array, avoiding the u->mq_bytes accounting logic. It reduces code size: text data bss dec hex filename 9949 72 16 10037 2735 ipc/mqueue-BEFORE.o 9941 72 16 10029 272d ipc/mqueue-AFTER.o Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03mqueue: fix mq_open() file descriptor leak on user-space processesAndré Goddard Rosa1-2/+1
We leak fd on lookup_one_len() failure Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fix race in d_splice_alias()Al Viro1-1/+0
rehashing the negative placeholder opens a race with d_lookup(); we unhash it almost immediately (by d_move()), but the race window is there. Since d_move() doesn't rely on target being hashed, we don't need that d_rehash() at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03set S_DEAD on unlink() and non-directory rename() victimsAl Viro1-1/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03vfs: add NOFOLLOW flag to umount(2)Miklos Szeredi2-1/+10
Add a new UMOUNT_NOFOLLOW flag to umount(2). This is needed to prevent symlink attacks in unprivileged unmounts (fuse, samba, ncpfs). Additionally, return -EINVAL if an unknown flag is used (and specify an explicitly unused flag: UMOUNT_UNUSED). This makes it possible for the caller to determine if a flag is supported or not. CC: Eugene Teo <eugene@redhat.com> CC: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03get rid of ->mnt_parent in tomoyo/realpathAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03hppfs can use existing proc_mnt, no need for do_kern_mount() in thereAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Mirror MS_KERNMOUNT in ->mnt_flagsAl Viro3-1/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03get rid of useless vfsmount_lock use in put_mnt_ns()Al Viro1-6/+2
It hadn't been needed since we'd sanitized the logics in mark_mounts_for_expiry() (which, in turn, used to be a rudiment of bad old times when namespace_sem was per-ns). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Take vfsmount_lock to fs/internal.hAl Viro2-1/+2
no more users left outside of fs/*.c (and very few outside of fs/namespace.c, actually) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03get rid of insanity with namespace roots in tomoyoAl Viro1-19/+4
passing *any* namespace root to __d_path() as root is equivalent to just passing it {NULL, NULL}; no need to bother with finding the root of our namespace in there. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03take check for new events in namespace (guts of mounts_poll()) to namespace.cAl Viro3-8/+18
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Don't mess with generic_permission() under ->d_lock in hpfsAl Viro1-6/+9
Just use dentry_unhash() there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03sanitize const/signedness for udfAl Viro5-19/+19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03nilfs: sanitize const/signedness in dealing with ->d_name.nameAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03nilfs really shouldn't slap struct dentry on stack...Al Viro3-15/+12
... especially when it only needs (and initializes) .d_name of it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03sanitize const/signedness of ufs a bitAl Viro2-7/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03sanitize signedness/const for pointers to char in hpfs a bitAl Viro10-82/+97
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03new helper: iterate_mounts()Al Viro3-34/+33
apply function to vfsmounts in set returned by collect_mounts(), stop if it returns non-zero. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fix NFS4 handling of mountpoint statAl Viro1-3/+9
RFC says we need to follow the chain of mounts if there's more than one stacked on that point. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Clean follow_dotdot() up a bitAl Viro1-16/+3
No need to open-code follow_up() in it and locking can be lighter. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fix mnt_mountpoint abuse in smackAl Viro1-1/+1
(mnt,mnt_mountpoint) pair is conceptually wrong; if you want to use it for generating pathname and for nothing else *and* if you know that vfsmount tree is unchanging, you can get away with that, but the right solution for that is (mnt,mnt_root). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03a couple of mntget+dget -> path_get in nfs4procAl Viro1-4/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Switch alloc_nfs_open_context() to struct pathAl Viro1-4/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03New helper: path_is_under(path1, path2)Al Viro3-39/+37
Analog of is_subdir for vfsmount,dentry pairs, moved from audit_tree.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03VFS: Clean up shared mount flag propagationValerie Aurora3-3/+12
The handling of mount flags in set_mnt_shared() got a little tangled up during previous cleanups, with the following problems: * MNT_PNODE_MASK is defined as a literal constant when it should be a bitwise xor of other MNT_* flags * set_mnt_shared() clears and then sets MNT_SHARED (part of MNT_PNODE_MASK) * MNT_PNODE_MASK could use a comment in mount.h * MNT_PNODE_MASK is a terrible name, change to MNT_SHARED_MASK This patch fixes these problems. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03kill unused invalidate_inode_pages helperChristoph Hellwig4-9/+3
No one is calling this anymore as everyone has switched to invalidate_mapping_pages long time ago. Also update a few references to it in comments. nfs has two more, but I can't easily figure what they are actually referring to, so I left them as-is. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fs: re-order super_block to remove 16 bytes of padding on 64bit buildsRichard Kennedy1-6/+6
re-order structure super_block to remove 16 bytes of alignment padding on 64bit builds. This shrinks the size of super_block from 712 to 696 bytes so requiring one fewer 64 byte cache lines. Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> ----- patch against 2.6.33-rc5 compiled & tested on x86_64 AMDX2 desktop machine. I've been running with this patch applied for several weeks with no problems. regards Richard Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Simplify failure exits in s390/hypfs fill_super()Al Viro1-29/+13
->kill_sb() will be called after any failure exit, so no need to duplicate what it can do. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Don't bother with d_genocide in rpc_pipeAl Viro1-7/+2
kill_litter_super() from ->kill_sb() will take care of the junk
2010-03-03Use kill_litter_super() in autofs4 ->kill_sb()Al Viro1-61/+1
... and get rid of open-coding its guts (i.e. RIP autofs4_force_release()) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Get rid of mnt_mountpoint abuses in ext4Al Viro1-4/+2
path to mnt/mnt->mnt_root is no worse than that to mnt->mnt_parent/mnt->mnt_mountpoint *and* needs no pinning the sucker down (mnt is not going away and mnt->mnt_root won't change) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Sanitize autofs_dev_ioctl_ismountpoint()Al Viro1-7/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03switch infiniband uverbs to anon_inodesAl Viro4-81/+29
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03add several pieces to shared subtree documentationAl Viro1-1/+15
* document locking * add the missing part of data structure invariants (relationship between mnt_share and mnt_slave lists in case of a peer group among slaves). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Kill CL_PROPAGATION, sanitize fs/pnode.c:get_source()Al Viro3-14/+19
First of all, get_source() never results in CL_PROPAGATION alone. We either get CL_MAKE_SHARED (for the continuation of peer group) or CL_SLAVE (slave that is not shared) or both (beginning of peer group among slaves). Massage the code to make that explicit, kill CL_PROPAGATION test in clone_mnt() (nothing sets CL_MAKE_SHARED without CL_PROPAGATION and in clone_mnt() we are checking CL_PROPAGATION after we'd found that there's no CL_SLAVE, so the check for CL_MAKE_SHARED would do just as well). Fix comments, while we are at it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Switch gfs2 to nd_set_link()Al Viro1-86/+27
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Switch may_open() and break_lease() to passing O_...Al Viro8-21/+18
... instead of mixing FMODE_ and O_ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fs: improve remount,ro vs buffercache coherencyNick Piggin1-3/+15
Invalidate sb->s_bdev on remount,ro. Fixes a problem reported by Jorge Boncompte who is seeing corruption trying to snapshot a minix filesystem image. Some filesystems modify their metadata via a path other than the bdev buffer cache (eg. they may use a private linear mapping for their metadata, or implement directories in pagecache, etc). Also, file data modifications usually go to the bdev via their own mappings. These updates are not coherent with buffercache IO (eg. via /dev/bdev) and never have been. However there could be a reasonable expectation that after a mount -oremount,ro operation then the buffercache should subsequently be coherent with previous filesystem modifications. So invalidate the bdev mappings on a remount,ro operation to provide a coherency point. The problem was exposed when we switched the old rd to brd because old rd didn't really function like a normal block device and updates to rd via mappings other than the buffercache would still end up going into its buffercache. But the same problem has always affected other "normal" block devices, including loop. [akpm@linux-foundation.org: repair comment layout] Reported-by: "Jorge Boncompte [DTI2]" <jorge@dti2.net> Tested-by: "Jorge Boncompte [DTI2]" <jorge@dti2.net> Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03fs/dcache.c: CodingStyle cleanupH Hartley Sweeten1-23/+22
Cleanup EXPORT* macros according to Documantation/CodingStyle. Move EXPORT* macros to the line immediately after the closing function brace. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03some clean up in fs/procHelight.Xu2-6/+5
EXPORT_SYMBOL(proc_symlink); EXPORT_SYMBOL(proc_mkdir); EXPORT_SYMBOL(create_proc_entry); EXPORT_SYMBOL(proc_create_data); EXPORT_SYMBOL(remove_proc_entry); Those EXPORT_SYMBOL shouldn't be in fs/proc/root.c, should be in fs/proc/generic.c. Signed-off-by: Helight.Xu <helight.xu@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03libfs: Unexport and kill simple_prepare_writeBoaz Harrosh2-18/+6
Remove the EXPORT_UNUSED_SYMBOL of simple_prepare_write Collapse simple_prepare_write into it's only caller, though making it simpler and clearer to understand. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03libfs: Open code simple_commit_write into only userBoaz Harrosh1-24/+35
* simple_commit_write was only called by simple_write_end. Open coding it makes it tiny bit less heavy on the arithmetic and much more readable. * While at it use zero_user() for clearing a partial page. * While at it add a docbook comment for simple_write_end. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-03-03Revert "autofs4: always use lookup for lookup"Al Viro4-330/+158
This reverts commit 213614d583748d00967a91cacd656f417efb36ce. Alas, ->d_revalidate() can't rely on ->lookup() finishing what it's started; if d_alloc() in do_lookup() fails, we are not going to call ->lookup() at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-02-24Linux 2.6.33Linus Torvalds1-1/+1
2010-02-24parisc: Set PCI CLS early in boot.Carlos O'Donell1-2/+5
Set the PCI CLS early in the boot process to prevent device failures. In pcibios_set_master use the new pci_cache_line_size instead of a hard-coded value. Signed-off-by: Carlos O'Donell <carlos@codesourcery.com> Reviewed-by: Grant Grundler <grundler@google.com> Signed-off-by: Kyle McMartin <kyle@redhat.com>
2010-02-24microblaze: Fix out_le32() macroSteven J. Magnani1-1/+1
Trailing semicolon causes compilation involving out_le32() to fail. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-02-24microblaze: Fix cache loop function for cache rangeMichal Simek1-19/+8
I create wrong asm code but none test shows that this part of code is wrong. I am not convinces that were good idea to create asm optimized macros for caches. The reason is that there is not optimization with previous code that's why make sense to add old code and do some benchmarking which functions are faster. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-02-23net: bug fix for vlan + gro issueAjit Khaparde1-1/+1
Traffic (tcp) doesnot start on a vlan interface when gro is enabled. Even the tcp handshake was not taking place. This is because, the eth_type_trans call before the netif_receive_skb in napi_gro_finish() resets the skb->dev to napi->dev from the previously set vlan netdev interface. This causes the ip_route_input to drop the incoming packet considering it as a packet coming from a martian source. I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7. With this fix, the traffic starts and the test runs fine on both vlan and non-vlan interfaces. CC: Herbert Xu <herbert@gondor.apana.org.au> CC: Patrick McHardy <kaber@trash.net> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-23[IA64] Fix broken sn2 buildHedi Berriche1-1/+1
Revert the change made to arch/ia64/sn/kernel/setup.c by commit 204fba4aa303ea4a7bb726a539bf4a5b9e3203d0 as it breaks the build. Fixing the build the b94b08081fcecf83fa690d6c5664f6316fe72208 way breaks xpc because genksyms then fails to generate an CRC for per_cpu____sn_cnodeid_to_nasid because of limitations in the generic genksyms code. Signed-off-by: Hedi Berriche <hedi@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>