3 * Copyright (C) 2011 Novell Inc.
4 * Copyright (C) 2016 Red Hat, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
15 bool default_permissions;
20 /* private information held for overlayfs's superblock */
22 struct vfsmount *upper_mnt;
24 struct vfsmount **lower_mnt;
25 /* workbasedir is the path at workdir= mount option */
26 struct dentry *workbasedir;
27 /* workdir is the 'work' directory under workbasedir */
28 struct dentry *workdir;
29 /* index directory listing overlay inodes by origin file handle */
30 struct dentry *indexdir;
32 /* pathnames of lower and upper dirs, for show_options */
33 struct ovl_config config;
34 /* creds of process who forced instantiation of super block */
35 const struct cred *creator_cred;
38 /* sb common to all layers */
39 struct super_block *same_sb;
42 /* private information held for every overlayfs dentry */
46 unsigned long has_upper;
52 struct path lowerstack[];
55 struct ovl_entry *ovl_alloc_entry(unsigned int numlower);
58 struct ovl_dir_cache *cache;
62 struct inode vfs_inode;
63 struct dentry *__upperdentry;
66 /* synchronize copy up and more */
70 static inline struct ovl_inode *OVL_I(struct inode *inode)
72 return container_of(inode, struct ovl_inode, vfs_inode);
75 static inline struct dentry *ovl_upperdentry_dereference(struct ovl_inode *oi)
77 return lockless_dereference(oi->__upperdentry);