X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Fautofs4%2Fautofs_i.h;h=650d520de9971b795dc1a89669310d95ea51d782;hp=326dc08d3e3f53aa075e68948e5e4598d548c263;hb=94b798ff0d7d4c30e38f9b61fc29fd17472221f9;hpb=62ddc0046eae6b8e8374f0ac3b27b12a57baa2f6 diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 326dc08d3e3f..650d520de997 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -268,6 +268,17 @@ int autofs4_fill_super(struct super_block *, void *, int); struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); void autofs4_clean_ino(struct autofs_info *); +static inline int autofs_prepare_pipe(struct file *pipe) +{ + if (!pipe->f_op || !pipe->f_op->write) + return -EINVAL; + if (!S_ISFIFO(pipe->f_dentry->d_inode->i_mode)) + return -EINVAL; + /* We want a packet pipe */ + pipe->f_flags |= O_DIRECT; + return 0; +} + /* Queue management functions */ int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify);