diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 13:06:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-21 13:06:51 -0400 |
commit | 10effcb548c170d59ea1d2152f2ee0ad45ce4c9d (patch) | |
tree | 6a1bf04ed66a1dcd242e8b2bd0c86690194cc09f /fs/open.c | |
parent | c3ca48f062a37c2f79560a9b0b9f1b08039aa248 (diff) | |
parent | 0f60f240d522772467c7d2cebedb910748c78ed4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
FS: lookup_mnt() is only used in the core fs routines now
bfs: fix bitmap size argument to find_first_zero_bit()
fs: Use BUG_ON(!mnt) at dentry_open().
fs: devpts_pty_new() return -ENOMEM if dentry allocation failed
nfs: lock() vs unlock() typo
pstore: fix leaking ->i_private
introduce sys_syncfs to sync a single file system
Small typo fix...
Filesystem: fifo: Fixed coding style issue.
fs/inode: Fix kernel-doc format for inode_init_owner
select: remove unused MAX_SELECT_SECONDS
vfs: cleanup do_vfs_ioctl()
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -835,17 +835,8 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags, | |||
835 | 835 | ||
836 | validate_creds(cred); | 836 | validate_creds(cred); |
837 | 837 | ||
838 | /* | 838 | /* We must always pass in a valid mount pointer. */ |
839 | * We must always pass in a valid mount pointer. Historically | 839 | BUG_ON(!mnt); |
840 | * callers got away with not passing it, but we must enforce this at | ||
841 | * the earliest possible point now to avoid strange problems deep in the | ||
842 | * filesystem stack. | ||
843 | */ | ||
844 | if (!mnt) { | ||
845 | printk(KERN_WARNING "%s called with NULL vfsmount\n", __func__); | ||
846 | dump_stack(); | ||
847 | return ERR_PTR(-EINVAL); | ||
848 | } | ||
849 | 840 | ||
850 | error = -ENFILE; | 841 | error = -ENFILE; |
851 | f = get_empty_filp(); | 842 | f = get_empty_filp(); |