]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/fuse/fuse_i.h
fuse: umount should wait for all requests
[mirror_ubuntu-bionic-kernel.git] / fs / fuse / fuse_i.h
index d5773ca67ad2bbc36155a30fafa596dd7e44502a..a6a33272c15328f257fa563a94fbdcfb2a3775ff 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/xattr.h>
 #include <linux/pid_namespace.h>
 #include <linux/refcount.h>
+#include <linux/user_namespace.h>
 
 /** Max number of pages that can be used in a single read request */
 #define FUSE_MAX_PAGES_PER_REQ 32
@@ -466,6 +467,9 @@ struct fuse_conn {
        /** The pid namespace for this mount */
        struct pid_namespace *pid_ns;
 
+       /** The user namespace for this mount */
+       struct user_namespace *user_ns;
+
        /** Maximum read size */
        unsigned max_read;
 
@@ -852,6 +856,7 @@ void fuse_request_send_background_locked(struct fuse_conn *fc,
 
 /* Abort all requests */
 void fuse_abort_conn(struct fuse_conn *fc);
+void fuse_wait_aborted(struct fuse_conn *fc);
 
 /**
  * Invalidate inode attributes
@@ -870,7 +875,7 @@ struct fuse_conn *fuse_conn_get(struct fuse_conn *fc);
 /**
  * Initialize fuse_conn
  */
-void fuse_conn_init(struct fuse_conn *fc);
+void fuse_conn_init(struct fuse_conn *fc, struct user_namespace *user_ns);
 
 /**
  * Release reference to fuse_conn
@@ -964,8 +969,8 @@ int fuse_do_setattr(struct dentry *dentry, struct iattr *attr,
 
 void fuse_set_initialized(struct fuse_conn *fc);
 
-void fuse_unlock_inode(struct inode *inode);
-void fuse_lock_inode(struct inode *inode);
+void fuse_unlock_inode(struct inode *inode, bool locked);
+bool fuse_lock_inode(struct inode *inode);
 
 int fuse_setxattr(struct inode *inode, const char *name, const void *value,
                  size_t size, int flags);