aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-09-22 16:27:52 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-10-24 23:34:54 -0400
commit72c2d53192004845cbc19cd8a30b3212a9288140 (patch)
tree31fcd924438f03d5aa09d13ffd813fb153da37c3 /fs/autofs4
parent22bd002ee76aa7d7a3393f39d977f6c106153c60 (diff)
file->f_op is never NULL...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/autofs_i.h2
-rw-r--r--fs/autofs4/dev-ioctl.c6
2 files changed, 1 insertions, 7 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 3f1128b37e46..ebab147e9700 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -271,7 +271,7 @@ void autofs4_clean_ino(struct autofs_info *);
271 271
272static inline int autofs_prepare_pipe(struct file *pipe) 272static inline int autofs_prepare_pipe(struct file *pipe)
273{ 273{
274 if (!pipe->f_op || !pipe->f_op->write) 274 if (!pipe->f_op->write)
275 return -EINVAL; 275 return -EINVAL;
276 if (!S_ISFIFO(file_inode(pipe)->i_mode)) 276 if (!S_ISFIFO(file_inode(pipe)->i_mode))
277 return -EINVAL; 277 return -EINVAL;
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 0f00da329e71..1818ce7f5a06 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -658,12 +658,6 @@ static int _autofs_dev_ioctl(unsigned int command, struct autofs_dev_ioctl __use
658 goto out; 658 goto out;
659 } 659 }
660 660
661 if (!fp->f_op) {
662 err = -ENOTTY;
663 fput(fp);
664 goto out;
665 }
666
667 sbi = autofs_dev_ioctl_sbi(fp); 661 sbi = autofs_dev_ioctl_sbi(fp);
668 if (!sbi || sbi->magic != AUTOFS_SBI_MAGIC) { 662 if (!sbi || sbi->magic != AUTOFS_SBI_MAGIC) {
669 err = -EINVAL; 663 err = -EINVAL;