aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/dev-ioctl.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/autofs4/dev-ioctl.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'fs/autofs4/dev-ioctl.c')
-rw-r--r--fs/autofs4/dev-ioctl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index ba4a38b9c22f..509fe1eb66ae 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -372,6 +372,10 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
372 return -EBUSY; 372 return -EBUSY;
373 } else { 373 } else {
374 struct file *pipe = fget(pipefd); 374 struct file *pipe = fget(pipefd);
375 if (!pipe) {
376 err = -EBADF;
377 goto out;
378 }
375 if (!pipe->f_op || !pipe->f_op->write) { 379 if (!pipe->f_op || !pipe->f_op->write) {
376 err = -EPIPE; 380 err = -EPIPE;
377 fput(pipe); 381 fput(pipe);
@@ -551,7 +555,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
551 555
552 err = have_submounts(path.dentry); 556 err = have_submounts(path.dentry);
553 557
554 if (follow_down(&path)) 558 if (follow_down_one(&path))
555 magic = path.mnt->mnt_sb->s_magic; 559 magic = path.mnt->mnt_sb->s_magic;
556 } 560 }
557 561
@@ -724,6 +728,7 @@ static const struct file_operations _dev_ioctl_fops = {
724 .unlocked_ioctl = autofs_dev_ioctl, 728 .unlocked_ioctl = autofs_dev_ioctl,
725 .compat_ioctl = autofs_dev_ioctl_compat, 729 .compat_ioctl = autofs_dev_ioctl_compat,
726 .owner = THIS_MODULE, 730 .owner = THIS_MODULE,
731 .llseek = noop_llseek,
727}; 732};
728 733
729static struct miscdevice _autofs_dev_ioctl_misc = { 734static struct miscdevice _autofs_dev_ioctl_misc = {