summaryrefslogtreecommitdiff
path: root/fs/aufs/vfsub.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aufs/vfsub.c')
-rw-r--r--fs/aufs/vfsub.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c
index f072c59c0..89f999c97 100644
--- a/fs/aufs/vfsub.c
+++ b/fs/aufs/vfsub.c
@@ -7,10 +7,28 @@
*/
#include <linux/namei.h>
+#include <linux/nsproxy.h>
#include <linux/security.h>
#include <linux/splice.h>
+#include "../fs/mount.h"
#include "aufs.h"
+#ifdef CONFIG_AUFS_BR_FUSE
+int vfsub_test_mntns(struct vfsmount *mnt, struct super_block *h_sb)
+{
+ struct nsproxy *ns;
+
+ if (!au_test_fuse(h_sb) || !au_userns)
+ return 0;
+
+ ns = current->nsproxy;
+ /* no {get,put}_nsproxy(ns) */
+ return real_mount(mnt)->mnt_ns == ns->mnt_ns ? 0 : -EACCES;
+}
+#endif
+
+/* ---------------------------------------------------------------------- */
+
int vfsub_update_h_iattr(struct path *h_path, int *did)
{
int err;