aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/autofs_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r--fs/autofs4/autofs_i.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index eb1cc92cd67d..908e18455413 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -110,7 +110,6 @@ struct autofs_sb_info {
110 int sub_version; 110 int sub_version;
111 int min_proto; 111 int min_proto;
112 int max_proto; 112 int max_proto;
113 int compat_daemon;
114 unsigned long exp_timeout; 113 unsigned long exp_timeout;
115 unsigned int type; 114 unsigned int type;
116 int reghost_enabled; 115 int reghost_enabled;
@@ -270,6 +269,17 @@ int autofs4_fill_super(struct super_block *, void *, int);
270struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); 269struct autofs_info *autofs4_new_ino(struct autofs_sb_info *);
271void autofs4_clean_ino(struct autofs_info *); 270void autofs4_clean_ino(struct autofs_info *);
272 271
272static inline int autofs_prepare_pipe(struct file *pipe)
273{
274 if (!pipe->f_op || !pipe->f_op->write)
275 return -EINVAL;
276 if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode))
277 return -EINVAL;
278 /* We want a packet pipe */
279 pipe->f_flags |= O_DIRECT;
280 return 0;
281}
282
273/* Queue management functions */ 283/* Queue management functions */
274 284
275int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify); 285int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify);