diff options
| author | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
| commit | b32e3dc7860d00124fa432dba09667e647cb9bcc (patch) | |
| tree | 2fa6e56f389431dfb84609d3d7572cad76e88e71 /fs/open.c | |
| parent | 6604271c5bc658a6067ed0c3deba4d89e0e50382 (diff) | |
| parent | 96120d86fe302c006259baee9061eea9e1b9e486 (diff) | |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
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(); |
