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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 475f9c597cb..756d3286bee 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -278,6 +278,17 @@ int autofs4_fill_super(struct super_block *, void *, int);
278struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); 278struct autofs_info *autofs4_new_ino(struct autofs_sb_info *);
279void autofs4_clean_ino(struct autofs_info *); 279void autofs4_clean_ino(struct autofs_info *);
280 280
281static inline int autofs_prepare_pipe(struct file *pipe)
282{
283 if (!pipe->f_op || !pipe->f_op->write)
284 return -EINVAL;
285 if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode))
286 return -EINVAL;
287 /* We want a packet pipe */
288 pipe->f_flags |= O_DIRECT;
289 return 0;
290}
291
281/* Queue management functions */ 292/* Queue management functions */
282 293
283int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify); 294int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify);