summaryrefslogtreecommitdiffstats
path: root/fs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus2' of ↵Linus Torvalds2012-01-08267-7706/+1920
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-072-10/+197
| | | | | | | | | | | | | | | | 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-073-27/+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-071-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-073-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-073-0/+10
| | | | | | | | | | | | | | | | | | 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-0731-78/+77
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_path() to struct dentry *Al Viro2012-01-072-3/+3
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_devname() to struct dentry *Al Viro2012-01-072-11/+12
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: switch ->show_stats to struct dentry *Al Viro2012-01-073-13/+14
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * switch security_path_chmod() to struct path *Al Viro2012-01-071-1/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sbAl Viro2012-01-0710-17/+17
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| *-. Merge branches 'vfsmount-guts', 'umode_t' and 'partitions' into ZAl Viro2012-01-07179-6536/+426
| |\ \
| | | * fs: move code out of buffer.cAl Viro2012-01-0410-61/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * move fs/partitions to block/Al Viro2012-01-0434-6049/+0
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch open and mkdir syscalls to umode_tAl Viro2012-01-044-12/+12
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ceph: propagate umode_tAl Viro2012-01-042-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch hostfs_iattr to explicit unsigned shortAl Viro2012-01-041-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 may_mknod() to umode_tAl Viro2012-01-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch sys_chmod()/sys_fchmod()/sys_fchmodat() to umode_tAl Viro2012-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | SYSCALLx magic should take care of things, according to Linus... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | get rid of open-coded S_ISREG(), etc.Al Viro2012-01-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch is_sxid() to umode_tAl Viro2012-01-041-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | switch inode_init_owner() to umode_tAl Viro2012-01-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | fs: propagate umode_t, misc bitsAl Viro2012-01-049-17/+17
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | autofs4: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | hfsplus: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | hfs: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | cifs: propagate umode_tAl Viro2012-01-044-6/+6
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | fat: propagate umode_tAl Viro2012-01-042-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ntfs: propagate umode_tAl Viro2012-01-042-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-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | situation with mount options is the same as for udf Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | udf: propagate umode_tAl Viro2012-01-045-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <viro@zeniv.linux.org.uk>
| | * | fuse: propagate umode_tAl Viro2012-01-042-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | pohmelfs: propagate umode_tAl Viro2012-01-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | logfs: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ubifs: propagate umode_tAl Viro2012-01-042-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ncpfs: propagate umode_tAl Viro2012-01-043-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | hugetlbfs: propagate umode_tAl Viro2012-01-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | exofs: propagate umode_tAl Viro2012-01-043-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | nilfs: propagate umode_tAl Viro2012-01-043-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | affs: propagate umode_tAl Viro2012-01-042-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | sysfs: propagate umode_tAl Viro2012-01-043-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ocfs2: propagate umode_tAl Viro2012-01-044-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | dlmfs: use inode_init_owner()Al Viro2012-01-041-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | don't open-code it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | 9p: propagate umode_tAl Viro2012-01-044-14/+15
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | omfs: propagate umode_tAl Viro2012-01-043-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | reiserfs: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | xfs: propagate umode_tAl Viro2012-01-049-13/+13
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | sysv: propagate umode_tAl Viro2012-01-042-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| | * | ufs: propagate umode_tAl Viro2012-01-043-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>