summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/overlayfs.h
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2016-12-04 12:33:17 -0500
committerMiklos Szeredi <mszeredi@redhat.com>2016-12-16 05:02:57 -0500
commit32a3d848eb91a298334991f1891e12e0362f91db (patch)
tree693bf24282b44846903e45ff0ac165d8ef76e218 /fs/overlayfs/overlayfs.h
parent9aba652190f8cdced66967c97d6159de0cc8478e (diff)
ovl: clean up kstat usage
FWIW, there's a bit of abuse of struct kstat in overlayfs object creation paths - for one thing, it ends up with a very small subset of struct kstat (mode + rdev), for another it also needs link in case of symlinks and ends up passing it separately. IMO it would be better to introduce a separate object for that. In principle, we might even lift that thing into general API and switch ->mkdir()/->mknod()/->symlink() to identical calling conventions. Hell knows, perhaps ->create() as well... Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r--fs/overlayfs/overlayfs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index e07aa7b0ddb7..8af450b0e57a 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -212,8 +212,13 @@ static inline void ovl_copyattr(struct inode *from, struct inode *to)
212/* dir.c */ 212/* dir.c */
213extern const struct inode_operations ovl_dir_inode_operations; 213extern const struct inode_operations ovl_dir_inode_operations;
214struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry); 214struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry);
215struct cattr {
216 dev_t rdev;
217 umode_t mode;
218 const char *link;
219};
215int ovl_create_real(struct inode *dir, struct dentry *newdentry, 220int ovl_create_real(struct inode *dir, struct dentry *newdentry,
216 struct kstat *stat, const char *link, 221 struct cattr *attr,
217 struct dentry *hardlink, bool debug); 222 struct dentry *hardlink, bool debug);
218void ovl_cleanup(struct inode *dir, struct dentry *dentry); 223void ovl_cleanup(struct inode *dir, struct dentry *dentry);
219 224