summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus2' of ↵Linus Torvalds2012-01-08476-2879/+2588
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits) reiserfs: Properly display mount options in /proc/mounts vfs: prevent remount read-only if pending removes vfs: count unlinked inodes vfs: protect remounting superblock read-only vfs: keep list of mounts for each superblock vfs: switch ->show_options() to struct dentry * vfs: switch ->show_path() to struct dentry * vfs: switch ->show_devname() to struct dentry * vfs: switch ->show_stats to struct dentry * switch security_path_chmod() to struct path * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb vfs: trim includes a bit switch mnt_namespace ->root to struct mount vfs: take /proc/*/mounts and friends to fs/proc_namespace.c vfs: opencode mntget() mnt_set_mountpoint() vfs: spread struct mount - remaining argument of next_mnt() vfs: move fsnotify junk to struct mount vfs: move mnt_devname vfs: move mnt_list to struct mount vfs: switch pnode.h macros to struct mount * ...
| * reiserfs: Properly display mount options in /proc/mountsJan Kara2012-01-064-14/+204
| | | | | | | | | | | | | | | | Make reiserfs properly display mount options in /proc/mounts. CC: reiserfs-devel@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: prevent remount read-only if pending removesMiklos Szeredi2012-01-064-29/+7
| | | | | | | | | | | | | | | | | | | | | | If there are any inodes on the super block that have been unlinked (i_nlink == 0) but have not yet been deleted then prevent the remounting the super block read-only. Reported-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: count unlinked inodesMiklos Szeredi2012-01-062-54/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new counter to the superblock that keeps track of unlinked but not yet deleted inodes. Do not WARN_ON if set_nlink is called with zero count, just do a ratelimited printk. This happens on xfs and probably other filesystems after an unclean shutdown when the filesystem reads inodes which already have zero i_nlink. Reported by Christoph Hellwig. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: protect remounting superblock read-onlyMiklos Szeredi2012-01-064-5/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently remouting superblock read-only is racy in a major way. With the per mount read-only infrastructure it is now possible to prevent most races, which this patch attempts. Before starting the remount read-only, iterate through all mounts belonging to the superblock and if none of them have any pending writes, set sb->s_readonly_remount. This indicates that remount is in progress and no further write requests are allowed. If the remount succeeds set MS_RDONLY and reset s_readonly_remount. If the remounting is unsuccessful just reset s_readonly_remount. This can result in transient EROFS errors, despite the fact the remount failed. Unfortunately hodling off writes is difficult as remount itself may touch the filesystem (e.g. through load_nls()) which would deadlock. A later patch deals with delayed writes due to nlink going to zero. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: keep list of mounts for each superblockMiklos Szeredi2012-01-064-0/+11
| | | | | | | | | | | | | | | | | | Keep track of vfsmounts belonging to a superblock. List is protected by vfsmount_lock. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_options() to struct dentry *Al Viro2012-01-0639-91/+90
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_path() to struct dentry *Al Viro2012-01-063-4/+4
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_devname() to struct dentry *Al Viro2012-01-063-12/+13
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_stats to struct dentry *Al Viro2012-01-065-16/+17
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * switch security_path_chmod() to struct path *Al Viro2012-01-066-25/+15
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sbAl Viro2012-01-0614-25/+27
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| *-. Merge branches 'vfsmount-guts', 'umode_t' and 'partitions' into ZAl Viro2012-01-06375-1471/+1008
| |\ \
| | | * fs: move code out of buffer.cAl Viro2012-01-0328-83/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move invalidate_bdev, block_sync_page into fs/block_dev.c. Export kill_bdev as well, so brd doesn't have to open code it. Reduce buffer_head.h requirement accordingly. Removed a rather large comment from invalidate_bdev, as it looked a bit obsolete to bother moving. The small comment replacing it says enough. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | | * separate partition format handling from generic codeAl Viro2012-01-034-523/+542
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | | * move fs/partitions to block/Al Viro2012-01-0336-10/+8
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | | * make register_disk() staticAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch open and mkdir syscalls to umode_tAl Viro2012-01-037-21/+21
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch ->path_mknod() to umode_tAl Viro2012-01-036-8/+8
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch ->path_mkdir() to umode_tAl Viro2012-01-035-7/+7
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | tomoyo_mini_stat: switch to umode_tAl Viro2012-01-032-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | consolidate a bunch of ipcbuf.h instancesAl Viro2012-01-0311-317/+11
| | | | | | | | | | | | | | | | | | | | | | | | ... some still remain weird :-/ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | auditsc: propage umode_tAl Viro2012-01-031-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch kern_ipc_perm to umode_tAl Viro2012-01-033-8/+8
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | consolidate umode_t declarationsAl Viro2012-01-0319-102/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch spu_create(2) to use of SYSCALL_DEFINE4, make it use umode_tAl Viro2012-01-032-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch mq_open() to umode_tAl Viro2012-01-034-7/+7
| | | |
| | * | ceph: propagate umode_tAl Viro2012-01-032-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch hostfs_iattr to explicit unsigned shortAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <viro@zeniv.linux.org.uk>
| | * | switch miscdevice to umode_tAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch spufs guts to umode_tAl Viro2012-01-034-12/+12
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | init/initramfs.c: should use umode_tAl Viro2012-01-031-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch may_mknod() to umode_tAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | should_remove_suid(): inode->i_mode is umode_tAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch securityfs_create_file() to umode_tAl Viro2012-01-034-10/+10
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch security_path_chmod() to umode_tAl Viro2012-01-035-7/+7
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch sys_chmod()/sys_fchmod()/sys_fchmodat() to umode_tAl Viro2012-01-032-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | SYSCALLx magic should take care of things, according to Linus... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | sysctl: use umode_t for table permissionsAl Viro2012-01-032-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | get rid of open-coded S_ISREG(), etc.Al Viro2012-01-033-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | mqueue: propagate umode_tAl Viro2012-01-031-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch is_sxid() to umode_tAl Viro2012-01-032-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch inode_init_owner() to umode_tAl Viro2012-01-032-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | fs: propagate umode_t, misc bitsAl Viro2012-01-039-17/+17
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | autofs4: propagate umode_tAl Viro2012-01-032-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | hfsplus: propagate umode_tAl Viro2012-01-032-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | hfs: propagate umode_tAl Viro2012-01-032-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | cifs: propagate umode_tAl Viro2012-01-034-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | fat: propagate umode_tAl Viro2012-01-032-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ntfs: propagate umode_tAl Viro2012-01-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | same story as with isofs and udf... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | isofs: propagate umode_tAl Viro2012-01-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | situation with mount options is the same as for udf Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>