]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - fs/overlayfs/ovl_entry.h
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
;
26 struct ovl_layer
*layer
;
27 struct dentry
*dentry
;
30 /* private information held for overlayfs's superblock */
32 struct vfsmount
*upper_mnt
;
34 struct ovl_layer
*lower_layers
;
35 /* workbasedir is the path at workdir= mount option */
36 struct dentry
*workbasedir
;
37 /* workdir is the 'work' directory under workbasedir */
38 struct dentry
*workdir
;
39 /* index directory listing overlay inodes by origin file handle */
40 struct dentry
*indexdir
;
42 /* pathnames of lower and upper dirs, for show_options */
43 struct ovl_config config
;
44 /* creds of process who forced instantiation of super block */
45 const struct cred
*creator_cred
;
48 /* sb common to all layers */
49 struct super_block
*same_sb
;
50 /* Did we take the inuse lock? */
55 /* private information held for every overlayfs dentry */
59 unsigned long has_upper
;
65 struct ovl_path lowerstack
[];
68 struct ovl_entry
*ovl_alloc_entry(unsigned int numlower
);
71 struct ovl_dir_cache
*cache
;
75 struct inode vfs_inode
;
76 struct dentry
*__upperdentry
;
79 /* synchronize copy up and more */
83 static inline struct ovl_inode
*OVL_I(struct inode
*inode
)
85 return container_of(inode
, struct ovl_inode
, vfs_inode
);
88 static inline struct dentry
*ovl_upperdentry_dereference(struct ovl_inode
*oi
)
90 return READ_ONCE(oi
->__upperdentry
);