aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/open.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/open.c b/fs/open.c
index f83ca80cc59a..b52cf013ffa1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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();