Commit c212f9aa authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Al Viro

fs: Use BUG_ON(!mnt) at dentry_open().

dentry_open() requires callers to pass a valid vfsmount.
Signed-off-by: default avatarTetsuo Handa <>
Signed-off-by: default avatarAl Viro <>
parent aa597bc1
......@@ -835,17 +835,8 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags,
* We must always pass in a valid mount pointer. Historically
* callers got away with not passing it, but we must enforce this at
* the earliest possible point now to avoid strange problems deep in the
* filesystem stack.
if (!mnt) {
printk(KERN_WARNING "%s called with NULL vfsmount\n", __func__);
return ERR_PTR(-EINVAL);
/* We must always pass in a valid mount pointer. */
error = -ENFILE;
f = get_empty_filp();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment