pipe: limit the per-user amount of pages allocated in pipes
[pandora-kernel.git] / include / linux / pipe_fs_i.h
index 8778c26..0e8ecbd 100644 (file)
@@ -43,6 +43,7 @@ struct pipe_buffer {
  *     @fasync_writers: writer side fasync
  *     @inode: inode this pipe is attached to
  *     @bufs: the circular array of pipe buffers
+ *     @user: the user who created this pipe
  **/
 struct pipe_inode_info {
        wait_queue_head_t wait;
@@ -57,6 +58,7 @@ struct pipe_inode_info {
        struct fasync_struct *fasync_writers;
        struct inode *inode;
        struct pipe_buffer *bufs;
+       struct user_struct *user;
 };
 
 /*
@@ -142,6 +144,8 @@ void pipe_unlock(struct pipe_inode_info *);
 void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *);
 
 extern unsigned int pipe_max_size, pipe_min_size;
+extern unsigned long pipe_user_pages_hard;
+extern unsigned long pipe_user_pages_soft;
 int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *);