]> Git Repo - linux.git/log
linux.git
13 years agoconsolidate a bunch of ipcbuf.h instances
Al Viro [Wed, 27 Jul 2011 18:54:36 +0000 (14:54 -0400)]
consolidate a bunch of ipcbuf.h instances

... some still remain weird :-/

Signed-off-by: Al Viro <[email protected]>
13 years agoauditsc: propage umode_t
Al Viro [Wed, 27 Jul 2011 18:04:25 +0000 (14:04 -0400)]
auditsc: propage umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch kern_ipc_perm to umode_t
Al Viro [Wed, 27 Jul 2011 18:03:22 +0000 (14:03 -0400)]
switch kern_ipc_perm to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoconsolidate umode_t declarations
Al Viro [Tue, 26 Jul 2011 21:04:15 +0000 (17:04 -0400)]
consolidate umode_t declarations

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch spu_create(2) to use of SYSCALL_DEFINE4, make it use umode_t
Al Viro [Tue, 26 Jul 2011 20:50:23 +0000 (16:50 -0400)]
switch spu_create(2) to use of SYSCALL_DEFINE4, make it use umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch mq_open() to umode_t
Al Viro [Tue, 26 Jul 2011 09:26:10 +0000 (05:26 -0400)]
switch mq_open() to umode_t

13 years agoceph: propagate umode_t
Al Viro [Tue, 26 Jul 2011 08:52:22 +0000 (04:52 -0400)]
ceph: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch hostfs_iattr to explicit unsigned short
Al Viro [Tue, 26 Jul 2011 08:48:59 +0000 (04:48 -0400)]
switch hostfs_iattr to explicit unsigned short

It's shared between kernel-compiled hostfs_kern and userland-compiled
hostfs_user (it's uml stuff).  Use explicit type instead of playing
silly buggers with mode_t.  It's not a userland API per se; it interacts
between code compiled with types same as for host kernel and, directly
linked to it, code talking to libc.  Both sides come from the same
kernel source...

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch miscdevice to umode_t
Al Viro [Tue, 26 Jul 2011 08:47:38 +0000 (04:47 -0400)]
switch miscdevice to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch spufs guts to umode_t
Al Viro [Tue, 26 Jul 2011 08:47:14 +0000 (04:47 -0400)]
switch spufs guts to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoinit/initramfs.c: should use umode_t
Al Viro [Tue, 26 Jul 2011 08:34:13 +0000 (04:34 -0400)]
init/initramfs.c: should use umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch may_mknod() to umode_t
Al Viro [Tue, 26 Jul 2011 08:31:40 +0000 (04:31 -0400)]
switch may_mknod() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoshould_remove_suid(): inode->i_mode is umode_t
Al Viro [Tue, 26 Jul 2011 08:31:05 +0000 (04:31 -0400)]
should_remove_suid(): inode->i_mode is umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch securityfs_create_file() to umode_t
Al Viro [Tue, 26 Jul 2011 08:30:04 +0000 (04:30 -0400)]
switch securityfs_create_file() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch security_path_chmod() to umode_t
Al Viro [Tue, 26 Jul 2011 08:25:58 +0000 (04:25 -0400)]
switch security_path_chmod() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch sys_chmod()/sys_fchmod()/sys_fchmodat() to umode_t
Al Viro [Tue, 26 Jul 2011 08:22:01 +0000 (04:22 -0400)]
switch sys_chmod()/sys_fchmod()/sys_fchmodat() to umode_t

SYSCALLx magic should take care of things, according to Linus...

Signed-off-by: Al Viro <[email protected]>
13 years agosysctl: use umode_t for table permissions
Al Viro [Tue, 26 Jul 2011 07:47:31 +0000 (03:47 -0400)]
sysctl: use umode_t for table permissions

Signed-off-by: Al Viro <[email protected]>
13 years agoget rid of open-coded S_ISREG(), etc.
Al Viro [Tue, 26 Jul 2011 00:49:29 +0000 (20:49 -0400)]
get rid of open-coded S_ISREG(), etc.

Signed-off-by: Al Viro <[email protected]>
13 years agomqueue: propagate umode_t
Al Viro [Sun, 24 Jul 2011 18:18:20 +0000 (14:18 -0400)]
mqueue: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch is_sxid() to umode_t
Al Viro [Mon, 25 Jul 2011 03:21:59 +0000 (23:21 -0400)]
switch is_sxid() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch inode_init_owner() to umode_t
Al Viro [Mon, 25 Jul 2011 03:20:18 +0000 (23:20 -0400)]
switch inode_init_owner() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agofs: propagate umode_t, misc bits
Al Viro [Tue, 26 Jul 2011 07:30:54 +0000 (03:30 -0400)]
fs: propagate umode_t, misc bits

Signed-off-by: Al Viro <[email protected]>
13 years agoautofs4: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:29:03 +0000 (03:29 -0400)]
autofs4: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agohfsplus: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:26:51 +0000 (03:26 -0400)]
hfsplus: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agohfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:26:05 +0000 (03:26 -0400)]
hfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agocifs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:22:14 +0000 (03:22 -0400)]
cifs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agofat: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:21:30 +0000 (03:21 -0400)]
fat: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agontfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:20:46 +0000 (03:20 -0400)]
ntfs: propagate umode_t

same story as with isofs and udf...

Signed-off-by: Al Viro <[email protected]>
13 years agoisofs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:19:52 +0000 (03:19 -0400)]
isofs: propagate umode_t

situation with mount options is the same as for udf

Signed-off-by: Al Viro <[email protected]>
13 years agoudf: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:18:29 +0000 (03:18 -0400)]
udf: propagate umode_t

note re mount options: fmask and dmask are explicitly truncated to 12bit,
UDF_INVALID_MODE just needs to be guaranteed to differ from any such value.
And umask is used only in &= with umode_t, so we ignore other bits anyway.

Signed-off-by: Al Viro <[email protected]>
13 years agofuse: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:17:33 +0000 (03:17 -0400)]
fuse: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agopohmelfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:16:55 +0000 (03:16 -0400)]
pohmelfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoshmem, ramfs: propagate umode_t, open-coded S_ISREG
Al Viro [Tue, 26 Jul 2011 07:15:03 +0000 (03:15 -0400)]
shmem, ramfs: propagate umode_t, open-coded S_ISREG

Signed-off-by: Al Viro <[email protected]>
13 years agologfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:13:21 +0000 (03:13 -0400)]
logfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoubifs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:12:59 +0000 (03:12 -0400)]
ubifs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoncpfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:12:16 +0000 (03:12 -0400)]
ncpfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agohugetlbfs: propagate umode_t
Al Viro [Mon, 25 Jul 2011 03:17:40 +0000 (23:17 -0400)]
hugetlbfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoexofs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:07:49 +0000 (03:07 -0400)]
exofs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agonilfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:07:14 +0000 (03:07 -0400)]
nilfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agosunrpc: propagate umode_t
Al Viro [Mon, 25 Jul 2011 04:35:13 +0000 (00:35 -0400)]
sunrpc: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoaffs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 07:04:30 +0000 (03:04 -0400)]
affs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agocgroup: propagate mode_t
Al Viro [Tue, 26 Jul 2011 05:55:55 +0000 (01:55 -0400)]
cgroup: propagate mode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoinfiniband: umode_t noise, including open-coded S_ISDIR()
Al Viro [Mon, 25 Jul 2011 03:27:00 +0000 (23:27 -0400)]
infiniband: umode_t noise, including open-coded S_ISDIR()

Signed-off-by: Al Viro <[email protected]>
13 years agosysfs: propagate umode_t
Al Viro [Mon, 25 Jul 2011 03:44:53 +0000 (23:44 -0400)]
sysfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agousbfs: propagate umode_t
Al Viro [Mon, 25 Jul 2011 03:36:12 +0000 (23:36 -0400)]
usbfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agohypfs: umode_t noise and properly spelled S_ISDIR/S_ISREG
Al Viro [Mon, 25 Jul 2011 03:30:19 +0000 (23:30 -0400)]
hypfs: umode_t noise and properly spelled S_ISDIR/S_ISREG

Signed-off-by: Al Viro <[email protected]>
13 years agoocfs2: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:55:32 +0000 (02:55 -0400)]
ocfs2: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agodlmfs: use inode_init_owner()
Al Viro [Sun, 24 Jul 2011 17:43:19 +0000 (13:43 -0400)]
dlmfs: use inode_init_owner()

don't open-code it...

Signed-off-by: Al Viro <[email protected]>
13 years ago9p: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:53:22 +0000 (02:53 -0400)]
9p: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoomfs: propagate umode_t
Al Viro [Mon, 25 Jul 2011 02:58:10 +0000 (22:58 -0400)]
omfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoreiserfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:50:53 +0000 (02:50 -0400)]
reiserfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoxfs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:50:15 +0000 (02:50 -0400)]
xfs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agosysv: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:49:38 +0000 (02:49 -0400)]
sysv: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoufs: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:49:13 +0000 (02:49 -0400)]
ufs: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agominix: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:48:39 +0000 (02:48 -0400)]
minix: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoext4: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:48:06 +0000 (02:48 -0400)]
ext4: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoext3: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:46:57 +0000 (02:46 -0400)]
ext3: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoext2: propagate umode_t
Al Viro [Tue, 26 Jul 2011 06:46:18 +0000 (02:46 -0400)]
ext2: propagate umode_t

Signed-off-by: Al Viro <[email protected]>
13 years ago9p: don't bother with unixmode2p9mode() for link() and symlink()
Al Viro [Sun, 24 Jul 2011 22:59:07 +0000 (18:59 -0400)]
9p: don't bother with unixmode2p9mode() for link() and symlink()

Pass perm to v9fs_vfs_mkspecial() instead of passing mode;
calculate in caller when done for mknod(), use known value for link()
and symlink().  As the result, we avoid a bit of work *and* stop
mixing mode_t with P9_DMLINK.

Signed-off-by: Al Viro <[email protected]>
13 years agokill ecryptfs_create_underlying_file()
Al Viro [Sun, 24 Jul 2011 17:47:19 +0000 (13:47 -0400)]
kill ecryptfs_create_underlying_file()

it's a just a wrapper for vfs_create()

Signed-off-by: Al Viro <[email protected]>
13 years agoconfigfs: convert to umode_t
Al Viro [Mon, 25 Jul 2011 04:05:26 +0000 (00:05 -0400)]
configfs: convert to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch devtmpfs to umode_t
Al Viro [Sun, 24 Jul 2011 14:47:56 +0000 (10:47 -0400)]
switch devtmpfs to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch debugfs to umode_t
Al Viro [Sun, 24 Jul 2011 08:33:43 +0000 (04:33 -0400)]
switch debugfs to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch sysfs_chmod_file() to umode_t
Al Viro [Sun, 24 Jul 2011 07:40:40 +0000 (03:40 -0400)]
switch sysfs_chmod_file() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch procfs to umode_t use
Al Viro [Sun, 24 Jul 2011 07:36:29 +0000 (03:36 -0400)]
switch procfs to umode_t use

both proc_dir_entry ->mode and populating functions

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch ->is_visible() to returning umode_t
Al Viro [Sun, 24 Jul 2011 03:11:19 +0000 (23:11 -0400)]
switch ->is_visible() to returning umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch sysfs attr->mode to umode_t
Al Viro [Sun, 24 Jul 2011 03:10:46 +0000 (23:10 -0400)]
switch sysfs attr->mode to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch device_get_devnode() and ->devnode() to umode_t *
Al Viro [Sun, 24 Jul 2011 00:24:48 +0000 (20:24 -0400)]
switch device_get_devnode() and ->devnode() to umode_t *

both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.

Signed-off-by: Al Viro <[email protected]>
13 years agohugetlbfs: switch to inode_init_owner()
Al Viro [Mon, 25 Jul 2011 00:20:48 +0000 (20:20 -0400)]
hugetlbfs: switch to inode_init_owner()

... rather than open-coding it

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch ->mknod() to umode_t
Al Viro [Tue, 26 Jul 2011 05:52:52 +0000 (01:52 -0400)]
switch ->mknod() to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch ->create() to umode_t
Al Viro [Tue, 26 Jul 2011 05:42:34 +0000 (01:42 -0400)]
switch ->create() to umode_t

vfs_create() ignores everything outside of 16bit subset of its
mode argument; switching it to umode_t is obviously equivalent
and it's the only caller of the method

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch vfs_mkdir() and ->mkdir() to umode_t
Al Viro [Tue, 26 Jul 2011 05:41:39 +0000 (01:41 -0400)]
switch vfs_mkdir() and ->mkdir() to umode_t

vfs_mkdir() gets int, but immediately drops everything that might not
fit into umode_t and that's the only caller of ->mkdir()...

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch sys_mknodat(2) to umode_t
Al Viro [Mon, 25 Jul 2011 21:32:17 +0000 (17:32 -0400)]
switch sys_mknodat(2) to umode_t

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: fix the rest of sget() races
Al Viro [Wed, 4 Jan 2012 02:01:29 +0000 (21:01 -0500)]
vfs: fix the rest of sget() races

unfortunately, just checking MS_BORN after having grabbed ->s_umount in
sget() is not enough; places that pick superblock from a list and
grab s_umount shared need the same check in addition to checking for
->s_root; otherwise three-way race between failing mount, sget() and
such list-walker can leave us with list-walker coming *second*, when
temporary active ref grabbed by sget() (to be dropped when sget()
notices that original mount has failed by checking MS_BORN) has
lead to deactivate_locked_super() from failing ->mount() *not* doing
->kill_sb() and just releasing ->s_umount.  Once sget() gets through
and notices that MS_BORN had never been set it will drop the active
ref and fs will be shut down and kicked out of all lists, but it's
too late for something like sync_supers().

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: new helper - vfs_ustat()
Al Viro [Tue, 3 Jan 2012 03:28:36 +0000 (22:28 -0500)]
vfs: new helper - vfs_ustat()

... and bury user_get_super()/statfs_by_dentry() - they are
purely internal now.

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: live vfsmounts never have NULL ->mnt_sb
Al Viro [Fri, 9 Dec 2011 04:01:06 +0000 (23:01 -0500)]
vfs: live vfsmounts never have NULL ->mnt_sb

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: for usbfs, etc. internal vfsmounts ->mnt_sb->s_root == ->mnt_root
Al Viro [Wed, 7 Dec 2011 23:21:57 +0000 (18:21 -0500)]
vfs: for usbfs, etc. internal vfsmounts ->mnt_sb->s_root == ->mnt_root

Signed-off-by: Al Viro <[email protected]>
13 years agoget rid of timer in kern/acct.c
Al Viro [Fri, 9 Dec 2011 01:08:42 +0000 (20:08 -0500)]
get rid of timer in kern/acct.c

... and clean it up a bit, while we are at it

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: pipe.c is really non-modular
Al Viro [Mon, 19 Dec 2011 01:17:41 +0000 (20:17 -0500)]
vfs: pipe.c is really non-modular

... so no exitcalls there.  Not much would work if pipe(2) would stop
working, after all...

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: fix the stupidity with i_dentry in inode destructors
Al Viro [Mon, 12 Dec 2011 20:51:45 +0000 (15:51 -0500)]
vfs: fix the stupidity with i_dentry in inode destructors

Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
the cost of taking it into inode_init_always() will be negligible for pipes
and sockets and negative for everything else.  Not to mention the removal of
boilerplate code from ->destroy_inode() instances...

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: mnt_drop_write_file()
Al Viro [Fri, 9 Dec 2011 13:06:57 +0000 (08:06 -0500)]
vfs: mnt_drop_write_file()

new helper (wrapper around mnt_drop_write()) to be used in pair with
mnt_want_write_file().

Signed-off-by: Al Viro <[email protected]>
13 years agoconstify seq_file stuff
Al Viro [Fri, 9 Dec 2011 01:18:57 +0000 (20:18 -0500)]
constify seq_file stuff

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: make do_kern_mount() static
Al Viro [Tue, 13 Dec 2011 04:07:05 +0000 (23:07 -0500)]
vfs: make do_kern_mount() static

the only user outside of fs/namespace.c has died

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: convert fs_supers to hlist
Al Viro [Tue, 13 Dec 2011 03:53:00 +0000 (22:53 -0500)]
vfs: convert fs_supers to hlist

Signed-off-by: Al Viro <[email protected]>
13 years agomake nfs_follow_remote_path() handle ERR_PTR() passed as root_mnt
Al Viro [Thu, 17 Nov 2011 02:52:06 +0000 (21:52 -0500)]
make nfs_follow_remote_path() handle ERR_PTR() passed as root_mnt

... rather than duplicating that in callers

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: kill ->mnt_devname use in afs printks
Al Viro [Fri, 25 Nov 2011 07:22:06 +0000 (02:22 -0500)]
vfs: kill ->mnt_devname use in afs printks

Signed-off-by: Al Viro <[email protected]>
13 years agobtrfs, nfs, apparmor: don't pull mnt_namespace.h for no reason...
Al Viro [Fri, 25 Nov 2011 01:14:54 +0000 (20:14 -0500)]
btrfs, nfs, apparmor: don't pull mnt_namespace.h for no reason...

it's not needed anymore; we used to, back when we had to do
mount_subtree() by hand, complete with put_mnt_ns() in it.
No more...  Apparmor didn't need it since the __d_path() fix.

Signed-off-by: Al Viro <[email protected]>
13 years agotomoyo: stop including hell knows what
Al Viro [Fri, 25 Nov 2011 01:08:53 +0000 (20:08 -0500)]
tomoyo: stop including hell knows what

tomoyo/realpath.c needs exactly one include - that of common.h.  It pulls
everything the thing needs, without doing ridiculous garbage such as trying
to include ../../fs/internal.h.  If that alone doesn't scream "layering
violation", I don't know what does; and these days it's all for nothing,
since it fortunately does not use any symbols defined in there...

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: dentry_reset_mounted() doesn't use vfsmount argument
Al Viro [Fri, 25 Nov 2011 00:31:36 +0000 (19:31 -0500)]
vfs: dentry_reset_mounted() doesn't use vfsmount argument

lose it

Signed-off-by: Al Viro <[email protected]>
13 years agounexport put_mnt_ns(), make create_mnt_ns() static outright
Al Viro [Thu, 17 Nov 2011 03:01:36 +0000 (22:01 -0500)]
unexport put_mnt_ns(), make create_mnt_ns() static outright

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: add missing parens in pnode.h macros
Al Viro [Wed, 23 Nov 2011 17:27:01 +0000 (12:27 -0500)]
vfs: add missing parens in pnode.h macros

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: more mnt_parent cleanups
Al Viro [Thu, 24 Nov 2011 00:34:49 +0000 (19:34 -0500)]
vfs: more mnt_parent cleanups

a) mount --move is checking that ->mnt_parent is non-NULL before
looking if that parent happens to be shared; ->mnt_parent is never
NULL and it's not even an misspelled !mnt_has_parent()

b) pivot_root open-codes is_path_reachable(), poorly.

c) so does path_is_under(), while we are at it.

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: new internal helper: mnt_has_parent(mnt)
Al Viro [Thu, 24 Nov 2011 00:26:23 +0000 (19:26 -0500)]
vfs: new internal helper: mnt_has_parent(mnt)

vfsmounts have ->mnt_parent pointing either to a different vfsmount
or to itself; it's never NULL and termination condition in loops
traversing the tree towards root is mnt == mnt->mnt_parent.  At least
one place (see the next patch) is confused about what's going on;
let's add an explicit helper checking it right way and use it in
all places where we need it.  Not that there had been too many,
but...

Signed-off-by: Al Viro <[email protected]>
13 years agovfs: kill pointless helpers in namespace.c
Al Viro [Thu, 24 Nov 2011 00:04:52 +0000 (19:04 -0500)]
vfs: kill pointless helpers in namespace.c

mnt_{inc,dec}_count() is not cleaner than doing the corresponding
mnt_add_count() directly and mnt_set_count() is not used at all.

Signed-off-by: Al Viro <[email protected]>
13 years agonew helpers: fh_{want,drop}_write()
Al Viro [Wed, 23 Nov 2011 17:03:18 +0000 (12:03 -0500)]
new helpers: fh_{want,drop}_write()

A bunch of places in nfsd does mnt_{want,drop}_write on vfsmount of
export of given fhandle.  Switched to obvious inlined helpers...

Signed-off-by: Al Viro <[email protected]>
13 years agoswitch a bunch of places to mnt_want_write_file()
Al Viro [Wed, 23 Nov 2011 16:57:51 +0000 (11:57 -0500)]
switch a bunch of places to mnt_want_write_file()

it's both faster (in case when file has been opened for write) and cleaner.

Signed-off-by: Al Viro <[email protected]>
13 years agotrim fs/internal.h
Al Viro [Tue, 22 Nov 2011 02:15:42 +0000 (21:15 -0500)]
trim fs/internal.h

some stuff in there can actually become static; some belongs to pnode.h
as it's a private interface between namespace.c and pnode.c...

Signed-off-by: Al Viro <[email protected]>
13 years agopull manipulations of rpc_cred inside alloc_nfs_open_context()
Al Viro [Sun, 23 Oct 2011 22:49:54 +0000 (18:49 -0400)]
pull manipulations of rpc_cred inside alloc_nfs_open_context()

No need to duplicate them in both callers; make it return
ERR_PTR(-ENOMEM) on allocation failure instead of NULL and
it'll be able to report rpc_lookup_cred() failures just
fine.  Callers are much happier that way...

Signed-off-by: Al Viro <[email protected]>
13 years agoRevert "rtc: Disable the alarm in the hardware"
Linus Torvalds [Wed, 4 Jan 2012 01:32:13 +0000 (17:32 -0800)]
Revert "rtc: Disable the alarm in the hardware"

This reverts commit c0afabd3d553c521e003779c127143ffde55a16f.

It causes failures on Toshiba laptops - instead of disabling the alarm,
it actually seems to enable it on the affected laptops, resulting in
(for example) the laptop powering on automatically five minutes after
shutdown.

There's a patch for it that appears to work for at least some people,
but it's too late to play around with this, so revert for now and try
again in the next merge window.

See for example

http://bugs.debian.org/652869

Reported-and-bisected-by: Andreas Friedrich <[email protected]> (Toshiba Tecra)
Reported-by: Antonio-M. Corbi Bellot <[email protected]> (Toshiba Portege R500)
Reported-by: Marco Santos <[email protected]> (Toshiba Portege Z830)
Reported-by: Christophe Vu-Brugier <[email protected]> (Toshiba Portege R830)
Cc: Jonathan Nieder <[email protected]>
Requested-by: John Stultz <[email protected]>
Cc: [email protected] # for the versions that applied this
Signed-off-by: Linus Torvalds <[email protected]>
13 years agohung_task: fix false positive during vfork
Mandeep Singh Baines [Tue, 3 Jan 2012 22:41:13 +0000 (14:41 -0800)]
hung_task: fix false positive during vfork

vfork parent uninterruptibly and unkillably waits for its child to
exec/exit. This wait is of unbounded length. Ignore such waits
in the hung_task detector.

Signed-off-by: Mandeep Singh Baines <[email protected]>
Reported-by: Sasha Levin <[email protected]>
LKML-Reference: <1325344394.28904.43.camel@lappy>
Cc: Linus Torvalds <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: John Kacur <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
This page took 0.089059 seconds and 4 git commands to generate.