diff options
Diffstat (limited to 'fs/autofs4/autofs_i.h')
-rw-r--r-- | fs/autofs4/autofs_i.h | 11 |
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); | |||
278 | struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); | 278 | struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); |
279 | void autofs4_clean_ino(struct autofs_info *); | 279 | void autofs4_clean_ino(struct autofs_info *); |
280 | 280 | ||
281 | static 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 | ||
283 | int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify); | 294 | int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify); |